One way to install Docker is to add its repository and then install it from it. There are a lot of steps that need to be done for this, as seen here.
Since I do not really update packages so often, I prefer downloading the DEB file and installing it manually.
- Go to https://download.docker.com/linux/ubuntu/dists/. Pick your Ubuntu version. 16.04 is Xenial for example. Then pick
pool/stable/amd64/and then download the latest DEB file.
Install the downloaded package:
$ sudo dpkg -i your_docker_file.deb
- Remember to add your username to the
$ sudo adduser joe docker
You will need to logout and login for the group assignment to take effect. If you find that logout-login to be painful, try this trick.
Try Docker and see if it works:
$ docker run hello-world
Tried with: Docker 17.09 and Ubuntu 16.04