Hot on the heels of yesterday's post, I am going to address the one disappointment of that post. It installs an old version of docker! Let's celebrate Docker 1.0 by using Docker 1.0!

Really Painless on AWS

I have produced a new Cloudformation template: docker_server2.cfn.json which brings up an EC2 instance with the latest version of Docker (1.0 at the time of this writing). You can follow the instructions in my previous post to use this new template. It takes several minutes after the EC2 instance is created for it to boot up and install all the required software, therefore I have made it write the file "READY.txt" to the /home/ubuntu directory when Docker is fully installed.

If you want to install the latest Docker on Ubuntu manually, follow the directions below.

Adding a New Repository

In order to use the latest version of docker, while keeping the ease and simplicity of the Advanced Packaging Tool (APT), we need to add a new repository to our ubuntu. I am going to assume that we are running Ubuntu 14.04 LTS for this example.

First, let's start a root shell with:

sudo -s

Next, add the repository:

echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list

We need to install a key as well:

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

Next, update the package cache:

apt-get update

Finally, install the lxc-docker package:

apt-get install lxc-docker

As an optional step you can add yourself to the docker group in order to be able to run Docker without using sudo. You can do this using the command:

usermod -a -G docker [username]

Be sure to switch to that group using

sg docker

Happy Dockerizing!