-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiarch support #16
Comments
There are no plans for this. But I found this an interesting idea and did some experiments that can be https://github.com/gotoz/runq/tree/binfmt_misc This (experimental) branch allows running unmodified AArch64 Docker images on an x86 host.E.g.:
Please give it a try. |
Thanks for the fast reply. This works and might be a nice feature on its own, but unfortunately this is not what I had in mind. My hole idea was not to use qemu-user-static but full system emulation, because it does not support all syscalls. e.g. ptrace. So instead of always using the nativ architecture to select the qmeu executable make this configurable in order to have a qemu-system-aarch64 runner on an amd64 platform. |
For this you would also need an target architecture specific guest kernel and initrd. |
The usual way people run multiarch in docker, with bin-fmt inside the container, can result in an insane slowdown because it spawns qemu for every command that has to be run. If you're just running one long-lived application, it works just fine. For a build that calls a large number of commands (e.g. C, C++), it can easily be on the grounds of 10x slower than what it could be. For runq, it would make a lot more sense to not have binfmt anywhere. You run a different CPU and arch inside the QEMU vm, and everything is there would be in "native" mode for that cpu/arch. There is no launch-qemu-for-every-command cost anymore. For multiarch runq, you'd have runq change the qemu parameters to the required cpu/arch based on what you specified in the docker command line, I suppose... |
I would like to be able to run multi arch images.
With normal runc backend this is possible by enabling qmeu-binfmt and then simply running
Trying this with runq will result in exec error
Are there plans to support other architectures?
Maybe add a flag that maps to the requested qemu variant? e.g.
-e RUNQ_ARCH=aarch64
The text was updated successfully, but these errors were encountered: