Skip to content

Instantly share code, notes, and snippets.

@katopz
Last active May 17, 2016 19:15
Show Gist options
  • Save katopz/7838084c97f70448b3aa3f583c33c595 to your computer and use it in GitHub Desktop.
Save katopz/7838084c97f70448b3aa3f583c33c595 to your computer and use it in GitHub Desktop.
Install Docker on Ubuntu 14.04
# Install Docker on Ubuntu 14.04
# Ref https://docs.docker.com/engine/installation/linux/ubuntulinux/
# Update your APT package index.
sudo apt-get update
# Ensure that APT works with the https method, and that CA certificates are installed.
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
# Add docker.list
sudo echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" > /etc/apt/sources.list.d/docker.list
# Update your 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.
sudo apt-cache policy docker-engine
# Install the recommended package.
sudo apt-get install linux-image-extra-$(uname -r)
# Ubuntu 14.04 or 12.04, apparmor is required.
sudo apt-get install apparmor
# Install Docker.
sudo apt-get install docker-engine
# Start the docker daemon.
sudo service docker start
# Below this is optional.
echo '# -----------------------------------------------
# How to verify docker is installed correctly.
sudo docker run hello-world
# List Hello World
sudo docker ps -a
# Stop Hello World
sudo docker stop hungry_goldberg
# Remove Hello World
sudo docker rm hungry_goldberg
# -----------------------------------------------'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment