I have had a much outdated but heroically stable Dell PowerEdge 2550 for many
years now. It's great to have a place to work on personal development projects
without dealing with hourly costs etc, but sometimes the lack of performance can
really be an issue. A lot of the work I've done in the past few years has been
centered around virtualization and so the machine has collected more dust than
it once did. I've been doing some work with Docker recently and got
excited that I could deploy some of my projects on this machine again. Somehow,
I hadn't ever noticed that Docker is only supported on amd64 at this
point.
"focusing on amd64 for now"
"it should work fine on 32-bit"
"you just need new images and a 32-bit docker binary"
After some more searching I found that it wasn't incompatible but only
unsupported. With comments like these, I had a new yak to
shave.
The server started with a fully updated Ubuntu 13.04 install. I originally tried
to use the available Go deb packages but they were too old
(1.0.2) for Docker which requires at least 1.1. Next, I tried the
binary distribution but that was compiled with SSE2
optimizations enabled. I would have to build Go from source.
Building Go doesn't require a lot of prerequisites, but we need a
compiler and mercurial to clone the sources.
Not only is this server 32-bit, but it's old enough to lack support for SSE2.
Clone the Go sources.
Build Go and add it to our path.
For Docker, we need a few more prerequisites such as the Linux Containers
userspace tools and a kernel module for the Advanced Multi Layered Unification
Filesystem.
Clone the Docker sources.
Enable and build a 32-bit Docker.
A base image is just the contents of a minimal file system and we can create one
with debootstrap. The /etc/apt/sources.list file will not
contain anything except the single install repository.
We can now create a docker group and start the daemon. The group members will
have access to connect directly to the daemon running as root and potentially
gain root access on the host. Make sure to read the instructions
carefully and only do this on a development machine.
Now, in another terminal (a new login shell so your group membership takes
effect), we can import the base image.
Run a simple test to make sure that everything seems operational.
Create a Dockerfile and build an image
Wow, look at the size of that thing! Evidently the ruby1.9.3 package in Ubuntu
pulls in a ton of dependencies that we won't be needing and a different route
for Ruby will save us a ton of space. For now, let's just make sure it all
worked.
Awesome, Docker running on my 866MHz Pentium III! Now, on to make some
better images for test environments.