Replies: 21 comments 31 replies
-
@baude If we install qemu-user-static on the Fedora CoreOS, this would just work, although would be slow. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
@rhatdan, do you mean there is a way to be more efficient or that's just what it is ? I suppose we can also mimic what is done by docker ? |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
Then I guess it's the way to go and easy enough to implement 🙌 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
A friendly reminder that this issue had no activity for 30 days. |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
A friendly reminder that this issue had no activity for 30 days. |
Beta Was this translation helpful? Give feedback.
-
I'd recommend having podman machine ship with Shipping with I recently was upgraded to macOS M1 at work and had to do some digging around to get our production docker containers running locally for testing. Agreed that multi-arch is the way to go, but there should be a fallback enabled by default. |
Beta Was this translation helpful? Give feedback.
-
@dustymabe FYI |
Beta Was this translation helpful? Give feedback.
-
After installation of qemu-user-static and rebooting VM it lost all mounted directories. Do you know how to handle it? |
Beta Was this translation helpful? Give feedback.
-
While installing
That approach has several downsides:
|
Beta Was this translation helpful? Give feedback.
-
@dustymabe this is an ongoing theme for us ... how close is the layer stuff? |
Beta Was this translation helpful? Give feedback.
-
As of today it seems the Podman machine images come with If someone is interested in other archs though, installing Relatedly, is there a repo or changelog or something that I can follow to learn about changes made to the podman machine image? |
Beta Was this translation helpful? Give feedback.
-
Yes qemu-user-x86* should be installed on the fedora-coreos image that is used on M1s. |
Beta Was this translation helpful? Give feedback.
-
Yes I was just indicating that X86 processes can be emulated on Arm Systems and vice versa. |
Beta Was this translation helpful? Give feedback.
-
I've encountered this issue today while pulling https://hub.docker.com/r/serjs/go-socks5-proxy/tags which has a somewhat broken On an x64 Linux laptop
From an UX perspective, this seems a bit weird. Why is podman even pulling the image in the first place? From an naive PoV, I would expect that the pull-process already detects the architecture mismatch. |
Beta Was this translation helpful? Give feedback.
-
Just bumping the issue. It's April 2023, and Podman Desktop 0.13.0 still ships with a version of the Fedora CoreOS (37) where you have to SSH in and install these packages by hand after it runs My immediate use case is the opposite of M1 support, but the solution's the same. I have an oddball ARMv7 system that supports OCI containers, and rather than dedicate a Raspberry Pi 3 to the project as a headless build host, I'd much rather build on my x86_64 macOS box. I didn't expect to be sent on a major yak shaving expedition merely to get this simple test case working:
Mind, I've got a solution thanks to the information above. I'm just surprised to see that it isn't in Podman Desktop by this point. |
Beta Was this translation helpful? Give feedback.
-
Docker can run on Apple M1 a container built on X86 but Podman can't
Beta Was this translation helpful? Give feedback.
All reactions