Skip to content

Images don't work on macos with podman #43

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

Closed
freezeboy opened this issue May 25, 2022 · 3 comments
Closed

Images don't work on macos with podman #43

freezeboy opened this issue May 25, 2022 · 3 comments

Comments

@freezeboy
Copy link

I tried to run different images on a macbook and got errors about a problem with the Exec format.

I didn't inspect the image layout so I don't know if the binaries are not put in the correct directory or if docker and podman understand differently the CMD instruction

Even a basic podman run -ti --rm nixpkgs/bash bash doesn't work

@freezeboy
Copy link
Author

In fact the error is about the architecture.
My computer is using m1 so an aarch64 architecture and the versions published on docker hub is only on x86-64

@daniels
Copy link

daniels commented Nov 20, 2022

It works for me, but you need to tell podman machine the architecture of the image with --arch amd64:

podman run --arch amd64 -ti --rm nixpkgs/bash
#=> bash-5.1# 

It might be that this is a recent addition to podman. Podman machine is still running aarch64 but emulates amd64 when asked to.

That said, it would actually be great to have these docker-nixpkgs images generated for aarch64-linux too, so they could run virtualized rather than emulated on Apple Silicon. I've managed to create a nix remote-builder using docker.io/nixpkgs/nix-flakes as a base and running it on podman on my M1, but it's of course terribly slow. While I do need to produce images for x86_64-linux eventually, being able to produce them for aarch64-linux in development and testing, and only build them for x86_64 when it's time to ship, would make an acceptable workflow. And for that I need a aarch64-linux remote-builder as well.

@zimbatm
Copy link
Member

zimbatm commented Nov 28, 2022

Opened #46 to track the aarch64 requirement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants