Hacker News new | ask | show | jobs
by itsautomatisch 818 days ago
I'm curious what issues you have with it, as it should be pretty much a 1:1 replacement when you use the Docker compatibility for most people. Rancher Desktop is also a pretty good replacement as well there are things that aren't quite working in Podman.
1 comments

I've been using it in lieu Docker Desktop for Mac for the past year and it mostly works, but I do hit issues and have to debug them.

- Several issues with non-native containers which are commonly encountered on Apple Silicon Macs: multi-platform containers start much slower, sudo commands in non-native containers don't work, the TARGETARCH variable was set wrong (fixed), the Docker API implementation didn't pay attention to the specified platform (fixed).

- The daemon that creates docker.sock so you can use the Docker CLI doesn't clean up after itself if you uninstall, and this breaks Docker Desktop if you want to switch back (say, to investigate one of these incompatibilities).

- Host directories you want to mount into containers need to be configured when the machine VM is created.

- The machine VM defaults to using an unstable image, which completely broke in September 2023 for a few days.

https://github.com/search?q=org%3Acontainers%20is%3Aissue%20...

Interesting, I haven't hit many issues myself but it definitely seems like it's not as polished as I thought. It's definitely not as "vanilla" as Rancher Desktop, but I like the way it lets you do more outside of just the standard Docker Desktop workflow.

Can you elaborate on the host directories bit? I'm curious what you mean.

> Can you elaborate on the host directories bit? I'm curious what you mean.

Realize that when you are running podman on macOS, all of your containers are really running inside a Fedora virtual machine, and the `podman` (and `docker`) commands you execute are remotely controlling what's happening on this virtual machine.

So when you use -v to mount a file or directory into your container, you're really mounting it from the virtual machine, not your macOS host. For example:

    $ podman run --rm -v /etc/os-release:/foo debian head -n 1 /foo
    NAME="Fedora Linux"  # this file doesn't exist on macOS
But obviously you wanted to mount a directory from your macOS host into the container. Podman accomplishes this by creating some network mounts for a few directories on your macOS host, like /Users, at the same path inside the container. Presto, `-v /Users/itsautomatisch/Stuff:/stuff` works like you wanted.

If you want to be able to mount another macOS directory that Podman doesn't do by default, like /Volumes/Stuff, you have to recreate the podman machine VM (`podman machine rm && podman machine init -v /Volumes/Stuff`) but it clears the default list if you do this.

> sudo commands in non-native containers don't work

I haven’t seen that - do you know which flavor Linux that affected?

It has to do with the binfmt_misc configuration on the podman machine VM, which is used on non-Linux hosts like macOS. I've proposed that they update the machine VM configuration to fix the inconsistency with Docker Desktop but the conversation petered out.

Solution: https://stackoverflow.com/a/77354286/145504

Discussion: https://github.com/containers/podman/discussions/20445