Raspberry Pi has always been a fantastic platform for hobby projects and trying new technologies. However, the architecture of its processor makes it harder for us to find precompiled or prebuilt parts which fit in our systems. When it comes to Docker, an emerging container engine, base images for ARM devices are especially difficult to find.
In general, you'd like to start with a existing machine which runs your desired distro, and build base images from it by using corresponding toolchains like Debootstrap for Debian and pacstrap for ArchLinux.
Of course you can poke around and find out what exactly you need to do, but GitHub repo of Docker provides a great example for building base image. However, you need to adjust a few things to make it work smoothly.
First of all, you should change the URL of pacman mirror to obtain maximum downloading speed.
Since the script uses
expect to interact with
pacman, you should also change
EXPECT_TIMEOUT to prevent premature execution of
arch-root. Default value 120 is too small because of poor performance of SoC on Raspberry Pi.
Now you can follow the instruction of
mkimage-arch.sh and enjoy your very own base image.