The installation procedure is extracted from Docker official homepage, just for my own reference.
1. Download and install the GPG Key
$ apt-get update $ apt-get install apt-transport-https ca-certificates $ sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
2. Add the following line to /etc/apt/sources.list.d/docker.list
deb https://apt.dockerproject.org/repo ubuntu-trusty main
3. Install from Apt
$ sudo apt-get update $ sudo apt-get install linux-image-extra-$(uname -r) $ sudo apt-get install linux-image-generic-lts-trusty $ sudo apt-get install docker-engine $ sudo service docker start $ sudo docker run hello-world
4. A docker user group is created, we add a general user to this group, the user can control docker.
$ sudo usermod -aG docker ubuntu $ shutdown -r now