Add the Ubuntu PPA (Personal Package Archive) sources to your apt sources list. Copy and paste the following lines at once.
sudo sh -c "echo 'deb http://ppa.launchpad.net/dotcloud/lxc-docker/ubuntu precise main' >> /etc/apt/sources.list"
Update your sources. You will see a warning that GPG signatures cannot be verified.
sudo apt-get update
Now install it, you will see another warning that the package cannot be authenticated. Confirm install.
sudo apt-get install lxc-docker
Run!
docker
Want to hack on Docker? Awesome! We have some instructions to get you started. They are probably not perfect, please let us know if anything feels wrong or incomplete.
For other operating systems we recommend and provide a streamlined install with virtualbox, vagrant and an Ubuntu virtual machine.