3 ms·
On x86-64 Debian hosts you can install binfmt-support an qemu-user-static packages. You'll need to copy the qemu-armeb-static binary inside the container image
by kijiki 10y ago
On x86-64 Debian hosts you can install binfmt-support an qemu-user-static packages. You'll need to copy the qemu-armeb-static binary inside the container image.
Then you just build inside a container normally, and the kernel will run the ARM binaries inside qemu-user, translating the ARM system calls to x86-64.
If you don't control the host (ie, someone else's hosted CI service), you can do some sleazy hacks documented here:
https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/ https://resin.io/blog/building-arm-containers-on-any-x86-mac...
I've been meaning to try copying a cross-compiler and cross-binutil into the container, to make things faster (no need to binary-translate ARM gcc/ld to x86-64), but without statically linking the compiler/binutils, it turns into a library nightmare. In theory this should be possible with multi-arch, but I haven't invested the time to try to make it go yet.