Ubuntu 16.04 - Install Docker

Install Using PPA

Using a PPA will allow you to always use the latest version of Docker without waiting on the Ubuntu package maintainers. Normally I would recommend installing from the Ubuntu Repos, but with docker this method is what I recommend.

Docker will not start correctly if you are running a VPN connection. This will make it appear like installation failed when actually installation succeeded but docker will fail to start up correctly.

Run the command below to install Docker through prog-exec.

prog-exec "7" "8260fb8f1d266abb3275b651e8e24f611751803046c1c9cd1741f98580f907ff"

... or you can execute the following script:

#!/bin/bash
sudo apt-get update -y
sudo apt-get install apt-transport-https ca-certificates -y

sudo apt-key adv \
--keyserver hkp://p80.pool.sks-keyservers.net:80 \
--recv-keys 58118E89F3A912897C070ADBF76221572C52609D

echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" \
| sudo tee /etc/apt/sources.list.d/docker.list


sudo apt-get update
sudo apt-get purge lxc-docker

sudo apt-get install -y docker-engine

# Add the current user to docker so that you can
# execute docker commands without using sudo
sudo usermod -aG docker $USER

echo "You will need to reboot before using docker."

Install From Ubuntu Repos

sudo apt update && sudo apt install docker.io -y

# Add our current user to the docker group so they can execute docker commands.
sudo usermod -a -G docker $USER

This will install version 1.10.3 at the time of writing this tutorial.

References

Author

Programster

Stuart is a software developer with a passion for Linux and open source projects.

comments powered by Disqus