Skip to content

Instantly share code, notes, and snippets.

@benbai123
Created August 25, 2016 11:32
Show Gist options
  • Save benbai123/f9ded9c604747cef943de2e7bd2f26ea to your computer and use it in GitHub Desktop.
Save benbai123/f9ded9c604747cef943de2e7bd2f26ea to your computer and use it in GitHub Desktop.
Install Docker on Ubuntu 14.04
# Ref: https://docs.docker.com/engine/installation/linux/ubuntulinux/
# Update package information, ensure that APT works with the https method, and that CA certificates are installed.
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
# Add the 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.
# Remove any existing entries.
# Add an entry for your Ubuntu operating system.
sudo gedit /etc/apt/sources.list.d/docker.list
# add this line
# deb https://apt.dockerproject.org/repo ubuntu-trusty main
# then save and close
# Update the APT package index.
sudo apt-get update
# Purge the old repo if it exists.
sudo apt-get purge lxc-docker
# Verify that APT is pulling from the right repository.
apt-cache policy docker-engine
# Update your package manager
sudo apt-get update
# Install the recommended packages.
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
# Update your APT package index.
sudo apt-get update
# Install Docker.
sudo apt-get install docker-engine
# Start the docker daemon.
sudo service docker start
# Verify docker is installed correctly
sudo docker run hello-world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment