Last active
March 22, 2020 09:55
-
-
Save datawookie/9f29795059e6bccf9892bc85ed285337 to your computer and use it in GitHub Desktop.
Install Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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