Created
August 16, 2017 01:00
-
-
Save jhenaoz/0b8e2c07dd60c4900715f5548015a6d4 to your computer and use it in GitHub Desktop.
docker set up in ubuntu
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/sh | |
# This script is from the tutorial of set docker in ubuntu server, further info https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#next-steps | |
# This usually fail in aws ubuntu linux because is no extra packages in aws linux | |
sudo apt-get install \ | |
linux-image-extra-$(uname -r) \ | |
linux-image-extra-virtual | |
sudo apt-get update | |
# Allow to use apt over https | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
# install the latest docker accoarding ubuntu distribution for amd64 architecture | |
sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
sudo apt-get update | |
sudo apt-get install docker-ce | |
# Now docker is installed up and running to use without sudo.... | |
sudo groupadd docker | |
sudo usermod -aG docker $USER | |
# Log out and enter again, you should be able to run docker run hello-world without sudo command. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment