If your system does not install the curl package, you need to type the commands
$ sudo apt-get install curl
After installing curl package, you just need to type following commands
$ curl -sSL https://get.docker.com/ubuntu/ | sudo sh
Finally, you can run a container to check the docker is installed or not.
$ sudo docker run -i -t ubuntu /bin/bash
If you want to upgrade your docker system, just type following commands
sudo apt-get update
sudo apt-get install lxc-docker
This approach is the most easiest way to install docker. If you want to know more information, you can go the the docker installation page