If you try to follow the documentation on docker.com and install the latest version you might encounter this error:
Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
to solve this run:
sudo apt-get install apparmor;sudo docker -d &
Cannot connect to the Docker daemon. Is 'docker -d' running on this host?
to solve this run:
sudo apt-get install apparmor;sudo docker -d &