Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Docker
#!/bin/bash
# ---------------------------------------------------------------------------------------------------------------------
# Amazon Linux
#
# sudo yum update -y
# sudo yum install -y docker
# sudo service docker start
# sudo usermod -a -G docker ec2-user
# Another simple approach to installing Docker:
#
# curl -fsSL get.docker.com -o get-docker.sh
# sh get-docker.sh
# ---------------------------------------------------------------------------------------------------------------------
# This script will install Docker Community Edition on a Debian system.
curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add -
# Install docker
#
OSNAME=$(. /etc/os-release; echo "$ID")
OSVERS=$(lsb_release -cs)
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$OSNAME $OSVERS stable"
#
sudo apt update
sudo apt install -y docker-ce docker-compose
# Test docker
#
sudo docker run hello-world
# Test docker-compose
#
docker-compose --version
# Add current user to docker group (only effective on next login).
#
sudo gpasswd -a `whoami` docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.