Make sure GitLab Hosted Runners are the same as GitLab.com runners
from a customer: https://gitlab.zendesk.com/agent/tickets/56306
On Gitlab, the dependencies install properly and the build completes as it should.
$ sudo update-binfmts --enable qemu-arm
update-binfmts: warning: qemu-arm already enabled in kernel.
[...]
I: Running command: chroot rootfs.debootstrap/ /debootstrap/debootstrap --second-stage
I: Keyring file not available at /usr/share/keyrings/debian-archive-keyring.gpg; switching to https mirror https://mirrors.kernel.org/debian
I: Installing core packages...
However on the Githost runner:
$ sudo update-binfmts --enable qemu-arm
update-binfmts: warning: Couldn't load the binfmt_misc module.
[...]
I: Running command: chroot rootfs.debootstrap/ /debootstrap/debootstrap --second-stage
chroot: failed to run command '/debootstrap/debootstrap': Exec format error
+ exit 126
This functionality is critical to our operation, and we solely chose to use Githost because we knew binfmt was included in the Gitlab runners.