-
Notifications
You must be signed in to change notification settings - Fork 2.4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Podman can't run command on M1 with container built on X86 #12144
Comments
@baude If we install qemu-user-static on the Fedora CoreOS, this would just work, although would be slow. |
This comment has been minimized.
This comment has been minimized.
Docker uses the same $ docker run -it arm64v8/alpine
WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested
standard_init_linux.go:228: exec user process caused: exec format error
$ sudo apt install qemu-user-static
...
$ docker run -it arm64v8/alpine
WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested
/ # exit It is statically linked, so it works the same inside the container as it does in Linux outside the container. $ podman machine init
Downloading VM image: fedora-coreos-34.20211016.2.1-qemu.x86_64.qcow2.xz: done
Extracting compressed file
$ podman machine start
INFO[0000] waiting for clients...
INFO[0000] listening tcp://0.0.0.0:7777
INFO[0000] new connection from @ to /run/user/1000/podman/qemu_podman-machine-default.sock
Waiting for VM ...
Machine "podman-machine-default" started successfully
$ podman-remote run -it amd64/alpine
Resolving "amd64/alpine" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/amd64/alpine:latest...
Getting image source signatures
Copying blob sha256:a0d0a0d46f8b52473982a3c466318f479767577551a53ffc9074c9fa7035982e
Copying config sha256:14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab
Writing manifest to image destination
Storing signatures
/ # exit
$ podman-remote run -it arm64v8/alpine
Resolving "arm64v8/alpine" using unqualified-search registries (/etc/containers/registries.conf.d/999-podman-machine.conf)
Trying to pull docker.io/arm64v8/alpine:latest...
Getting image source signatures
Copying blob sha256:552d1f2373af9bfe12033568ebbfb0ccbb0de11279f9a415a29207e264d7f4d9
Copying blob sha256:552d1f2373af9bfe12033568ebbfb0ccbb0de11279f9a415a29207e264d7f4d9
Copying config sha256:bb3de5531c18f185667b0be0e400ab24aa40f4440093de82baf4072e14af3b84
Writing manifest to image destination
Storing signatures
{"msg":"exec container process `/bin/sh`: Exec format error","level":"error","time":"2021-10-31T17:29:30.000710590Z"}
$ podman-remote run -it arm64v8/alpine
/ # exit |
Then I guess it's the way to go and easy enough to implement 🙌 |
Note that you get much better performance, by selecting the same arch... The "multi-arch" images (manifests) makes this easy, so that it gets the same name. https://github.com/docker-library/official-images#architectures-other-than-amd64 |
Yeah yeah I get it. Sometimes images are not available on one architecture and it's easier to just use them instead of having to build one for the arm64 architecture, especially for non production images. |
Probably one could have saved some space in the image, if not all binaries were in the same package ? Most users are only interested in |
A friendly reminder that this issue had no activity for 30 days. |
This seems like more of a discussion then an actual issue, unless you want us to ship qemu-user-static inside of the fedora coreos? |
A friendly reminder that this issue had no activity for 30 days. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Docker can run on Apple M1 a container built on X86 but Podman can't
The text was updated successfully, but these errors were encountered: