The Fedora version of the package drops configuration files into /usr/lib/binfmt.d/ for each emulator in the package, and systemd's systemd-binfmt.service uses the information they contain to configure the kernel's binfmt_misc module to invoke the right interpreter for the binaries that they can handle, usually at boot-time. That registration is also triggered when the package is installed.
Those config files are generated by a script that's part of the qemu source tree [1], and it can configure /proc directly if that's closer to what you need.
Okay, this was quite helpful, figured out the binfmt error. Void Linux has a similar service to the systemd-binfmt.service, which is in a package that's not depended upon by qemu-user-static. Installed that package and reconfigured qemu-user-static, now I don't get binfmt related errors anymore. That doesn't mean that buildah is happy though: ``` ➤ buildah bud --pull --manifest test --platform linux/arm64 . STEP 1: FROM docker.io/alpine Getting image source signatures Copying blob 595b0fe564bb done Copying config 3fcaaf3dc9 done Writing manifest to image destination Storing signatures STEP 2: RUN arch standard_init_linux.go:219: exec user process caused: no such file or directory error building at STEP "RUN arch": error while running runtime: exit status 1 ERRO exit status 1 ``` That's still not super helpful, not sure how to continue here. I'll try this again in a VM tomorrow, on a Fedora machine or a Debian machine, if that works out I'll go bother the Void people instead. Thanks for all the help so far, learned a lot today :) JC