How to install Docker on Ubuntu

To explore Docker, I have installed it on VirtualBox running with Ubuntu 14.04. I have followed following steps to install Docker.

Run below command to add Docker repository key to local keychain.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9

Run below commands to install docker.

sudo sh -c "echo deb http://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list" 
sudo apt-get update 
sudo apt-get install lxc-docker

To verify installation, let’s print version information using following command.

sudo docker version

The output should be similar to below. It might be different as it depends on docker version.

Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): linux/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef

I hope this post might help someone.