Multi-arch images
The images that are being built are built exclusively with amd64 architecture. This means when you try to use any executable in the built image on a non-amd64 architecture, you will get an error, "Exec format error".
In order to fix this, multi-arch builds have to be done for the containers. There are a few ways to accomplish this: Podman has buildx
which can be used to do this, but its also possible to pass the right variables to a podman build
to build each required architecture, and then compile the manifest together.
The problem is that we aren't simply doing a 'podman build' - we are running a shell script that runs mmdebstrap
which then pipes the resulting output to podman import
. Fortunately, mmdebstrap
has the --architecture
option, but in order to run a shell script in beginning, we have to use a multi-arch enabled image to run the shell executable on that architecture. I do not think it is sufficient to simply pass all the architectures to mmdebstrap
We'll either need to figure out how to build each architecture separately and then assemble the manifests, or cross-compile all of them at once.