Skip to content

Instantly share code, notes, and snippets.

@indrasantosa
Last active October 29, 2016 18:30
Show Gist options
  • Save indrasantosa/f8c9cd7cb3776b2c5f6f5d9f309079e9 to your computer and use it in GitHub Desktop.
Save indrasantosa/f8c9cd7cb3776b2c5f6f5d9f309079e9 to your computer and use it in GitHub Desktop.
Docker installation
# Prepare dependencies
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
# Add new GPG Key
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
# Open the /etc/apt/sources.list.d/docker.list file in your favorite editor.
# If the file doesn’t exist, create it.
# Add following files based on ubuntu versions
# Precise 12.04 (LTS) deb https://apt.dockerproject.org/repo ubuntu-precise main
# Trusty 14.04 (LTS) deb https://apt.dockerproject.org/repo ubuntu-trusty main
# Xenial 16.04 (LTS) deb https://apt.dockerproject.org/repo ubuntu-xenial main
# Add entry to the file : 14.04
deb https://apt.dockerproject.org/repo ubuntu-trusty main
# Update the repo
sudo apt-get update
# Do the real installation
sudo apt-get install docker-engine
# Make sure docker is getting from the correct one
apt-cache policy docker-engine
# Start docker service
sudo service docker start
# Add current user to docker user group
sudo usermod -aG docker $(whoami)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment