How Everything Started

A while ago I decided that it would be nice if I could host all the services that I “need” at home on some Docker host. While my NAS could run all those services, I didn’t want to put the burden of running an increasing number of containers on that one box. Instead I started moving my containers onto my Raspberry Pi.

Having run that setup sucessfully based on HypriotOS, I was wondering if there were any affordable ARM based systems out there that could be better equipped for the task. And I found the Odroid-C2, which comes with a 64-bit quad-core processor, 2Gbyte of RAM, and Gigabit Ethernet. Most importantly, there was a HypriotOS version support the Odroid-C2 - at least that’s what I thought.

The Adventure Begins

As it turned out, the HypriotOS team did some initial work, but then stopped. The pre-build image that was available was missing a crucial piece of code - Docker itself. At least at the time they stopped their efforts, there was no good way to build an ARM64 version of Docker. Luckily for me, they had pushed everything to their GitHub Repository, so at least there was a decent starting point for me.

(I am aware that Ubuntu for ARM64 comes with Docker support. However, HypriotOS is optimized for memory consumption in a way that Ubuntu isn’t)

Fixing image-builder-odroid-c2

Initially I had hoped that I running image-builder-odroid-c2 as described would result in a working version of the image. In reality that didn’t work and it took some days until I was able to properly boot the Odroid-C2 with a custom HypriotOS image. In retrospect, I am not sure if the problems I encountered were because the builder wasn’t maintained or due to the (premature?) changes I had made to the build scripts.

To get everything running, I had to look at the still-maintained Image Builder for the RPi. I tried to look at all the changes that happened on that repository since August 2016, then applying the (rationalized) changes to my own fork:

  • Picking up rootfs-arm64-*.tar.gz as basis for the disk image.
  • Modifying the way the build process imports GPG keys. Probably non-critical, but it certainly helped with the diffing.
  • Adoption of changes to the test scripts.

All of that took a while but didn’t get me much closer to my actual goal: running Docker on the Odroid-C2. That’s what Part 2 will be about.