-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add suport for QemuUserEmulation #119
Conversation
24373c0
to
1d04c63
Compare
Added check for fixed binary in binfmt_misc |
This allows running containers and binaries for other archs, like armhf, aarch64 and others without using qemu explicit. For example run a armhf docker container: docker run -i -t --rm arm32v7/debian:stable /bin/bash Signed-off-by: Johann Neuhauser <[email protected]>
1d04c63
to
f381383
Compare
For completeness, dbhi/qus is an alternative solution that works on either GNU/Linux or Windows (Docker for Windows) hosts. Precisely, the feature provided by this PR is equivalent to test |
Why do you think we can not run a arm64 container with this PR?
|
My bad. Since you check(ed) a single target platform, I thought you are/were not interested on others. In this context, advantages of dbhi/qus are;
Overall, I think this PR/feature is ok. The point of referencing dbhi/qus is for users to be aware of other alternatives when this PR falls short. |
I have a repo demonstrate how to build alpine packages for {amd64, i386, arm64v8, arm32v6, arm32v7, ppc64le, s390x} using multiarch/qemu-user-static from Docker Hub. During my test, I found that the qemu-user package from Ubuntu 18.04 is too old (or have some bug), and cannot build s390x packages correctly. While the qemu-user from multiarch/qemu-user-static works correctly. IMHO, two years between Ubuntu LTS releases is too long for something like qemu-user. It is not that fundamental for CI environment either (qemu-user is super SLOW). I would prefer not including qemu-user into base image. |
@zhangyoufu, you will find that multiarch/qemu-use-static is, actually, a sibling project of dbhi/qus. Precisely, the idea to support in-memory loading and to support multiple host architectures was borrowed from qus; see dbhi/qus#2 and multiarch/qemu-user-static#77.
I beg to disagree. Using DBM is the only solution to currently build non-amd64 images in GitHub Actions (or other amd64-only CI services). I do use this to generate multiarch/manifest images from GitHub Actions and/or Travis. See, for example, dbhi/docker. However, I agree that it is not a requirement to have qemu-user installed in the base image. |
This allows running containers and binaries for other archs,
like armhf, aarch64 and others without using qemu explicit.
For example run a armhf docker container:
docker run -i -t --rm arm32v7/debian:stable /bin/bash
The full list of supported host emulators is:
Signed-off-by: Johann Neuhauser [email protected]