This how to guide is based on an install of Docker on Ubuntu Desktop 16.04.1. To follow along, please download and install this first.
This blog post is really just a brain dump\illustration of the steps detailed in this article: https://docs.docker.com/engine/installation/linux/ubuntulinux/. There are multiple ways to install Docker on Ubuntu. Also, if you are using a different Linux flavor such as Debian, Fedora etc. the steps may vary a little.
Login to Ubuntu.
Open up the Terminal.
Enter: sudo apt-get update and hit enter.
You will get prompted for your password in order to run with sudo. You will get prompted for your credentials multiple times during this process.
Enter sudo apt-get install apt-transport-https ca-certificates and hit enter.
Enter sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
Navigate to the sources.list.d folder under etc\apt (You can find this by going to Files-->Computer), right click and click Open in Terminal.
Enter sudo nano and click enter.
Enter deb https://apt.dockerproject.org/repo ubuntu-xenial main and press ctrl+X and save as docker.list.
The docker.list file should have been created.
Enter sudo apt-get update and hit enter.
Enter sudo apt-get purge lxc-docker and hit enter.
Enter apt-cache policy docker-engine and hit enter.
Enter sudo apt-get update again and hit enter.
Enter sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual and hit enter. When prompted, enter Y to continue.
Once again, enter sudo apt-get update and hit enter.
Enter sudo apt-get install docker-engine and hit enter. When prompted, enter Y to continue. Congrats, Docker should now be installed successfully. Let's make sure!
Enter sudo service docker start and hit enter to start the docker service.
Enter sudo docker run hello-world and hit enter.
It should pull and run a simple sample Docker container as above.
I strongly advise you to install Docker Compose to build containers using other peoples projects. You can install Compose by browsing to: https://github.com/docker/compose/releases and copy the commands. Grab the commands for the latest release.
In the terminal, enter sudo -i and then paste in the commands. You can verify the install by entering docker-compose --version.
To configure different options, review this article: https://docs.docker.com/engine/installation/linux/ubuntulinux/ for things like ensuring docker runs on startup.