A bridge operator asked us to cross-compile our docker image for arm64. This sounds like an easy-ish fix that would make the lifes of our bridge operators easier. Let's figure out what it takes to support ARM and potentially other architectures.
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
On Linux, cross-architecture builds for docker are currently still an experimental feature that's provided by the "buildx" module. I'll briefly summarise how I got this module to run.
On my Debian buster, I installed the docker-ce-cli package and linked the module /usr/libexec/docker/cli-plugins/docker-buildx to ~/.docker/cli-plugins/docker-buildx. I then enabled experimental features by writing the following to the file /etc/docker/daemon.json:
{ "experimental": true }
Next, I restarted the docker service by running sudo service docker restart. Finally, I had to export the environment variable DOCKER_CLI_EXPERIMENTAL=enabled. Once all of that was done, I was able to use experimental features:
$ docker version -f '{{.Server.Experimental}}'true
...and in particular, the buildx plugin. I stumbled upon a useful blog post that provides an overview of this process.