And to add to Chris’ message about the use of QEMU on x86: QEMU is a great “Plan A” option, but it is also known for fail in a small fraction of image build tasks (I think when executables make use of some unusual processor instructions). I’ve noticed that you were already anticipating the possibility of using a Raspberry Pi setup to automate the building of ARM images. Yes indeed, it can be a good “Plan B”. Just to share some handy building blocks, here’s how you would build an image on a Raspberry Pi, then copy the image from the balena-engine daemon on the Pi to a docker daemon running on your laptop or desktop:
# build the docker image on the RPi at the given IP address
balena build -a my_app -h 192.168.2.3 -p 2375 .
# copy the docker image from the device to the laptop/desktop
ssh firstname.lastname@example.org -p 22222 balena-engine save my_image | docker load
balena command above is the balena CLI, which would you execute on your laptop or desktop (or cloud server + VPN, if it starts getting really fancy…)
The commands above assume that the RPi is running a development image of balenaOS, so port 2375 is exposed and root login is permitted. This is of course only appropriate in a protected private environment (local network), or behind a VPN.
After the image was copied from the RPi to you dev machine, you can proceed with uploading it to the Docker Hub. (Or I suppose you could also run a script on the RPi itself to upload the image directly to Docker Hub – a number of options to choose from!)