Live data from Hacker News

How to Replace Docker with Podman on a Mac

redhat.com

21–30 of 90 posts

Re: How to Replace Docker with Podman on a Mac

#21

My understanding is that this old article is no longer the simplest/easiest way of doing this. For that, see https://marcusnoble.co.uk/2021-09-01-migrating-from-docker-t... . tl;dr: $ brew install podman $ podman machine init $ podman machine start $ alias docker=podman If you're on an M1 you may run into https://github.com/containers/podman/issues/10577 (which is WIP, and may have been resolved by https://github.com…

Does this work with compose? Probably not but just wondering

It more or less works, at least on Linux.

https://www.redhat.com/sysadmin/podman-docker-compose

Re: How to Replace Docker with Podman on a Mac

#22
post #16

Is there any practical benefit of Podman over Docker on a Mac? Virtual machine is still needed, so any performance issues are likely to persist (well, maybe Docker for Mac is a bit more buggy, but we can manually setup Docker instead of Podman in a similar way). Also, I think we are losing here access to the Docker socket on the host (inside the virtual machine it can be emulated using docker-podman).

Not having to pay Docker Inc to use it is the big advantage along with the security that comes with a solution that isn’t the meal ticket of the company that makes it so it will likely live on community supported for a long time.

Re: How to Replace Docker with Podman on a Mac

#24
post #16

Is there any practical benefit of Podman over Docker on a Mac? Virtual machine is still needed, so any performance issues are likely to persist (well, maybe Docker for Mac is a bit more buggy, but we can manually setup Docker instead of Podman in a similar way). Also, I think we are losing here access to the Docker socket on the host (inside the virtual machine it can be emulated using docker-podman).

Podman does have a socket that can be started. I use it on Linux so I'm not sure how that works on MacOS but it's API is Docker compatible, thus works with the docker cli and docker-compose as well.

Re: How to Replace Docker with Podman on a Mac

#25
post #4

Earlier quoted context omitted.

It is mentioned in the article. "Fast forward a couple of months, podman-machine is now deprecated in lieu of Vagrant"

That's not accurate. There was an older project called podman-machine, which is long gone. What you get when you use the `podman machine` command is a completely new implementation.

And it is built into the podman binary, as opposed to being a separate project.

Re: How to Replace Docker with Podman on a Mac

#26
post #16

Is there any practical benefit of Podman over Docker on a Mac? Virtual machine is still needed, so any performance issues are likely to persist (well, maybe Docker for Mac is a bit more buggy, but we can manually setup Docker instead of Podman in a similar way). Also, I think we are losing here access to the Docker socket on the host (inside the virtual machine it can be emulated using docker-podman).

As a typical mac user there is no practical benefit.

Being on a Mac is so you can avoid lengthy configurations, scripts and commands and instead have something that just works and is seamlessly integrated.

This is the opposite.

You’d probably only want to go this route to make a statement about free open source software. But at that point you may as well run Linux

Re: How to Replace Docker with Podman on a Mac

#27
post #19

I tried podman on an intel mac and everything worked except mounting volumes

Volumes are one of those things that Just Don't Work, even in normal Docker. Our product's dev containers run fine in Docker on macOS on M1 but the filesystem permissions get messed up when running the same ones on Linux. It's just a silly root:root permissions issue, but it's irritating the problem was hidden when running on a Mac.

Re: How to Replace Docker with Podman on a Mac

#28
post #19

I tried podman on an intel mac and everything worked except mounting volumes

Volumes are one of those things that Just Don't Work, even in normal Docker. Our product's dev containers run fine in Docker on macOS on M1 but the filesystem permissions get messed up when running the same ones on Linux. It's just a silly root:root permissions issue, but it's irritating the problem was hidden when running on a Mac.

I've run into this too. My solution was to add some code in entrypoint.sh that looks for the UID/GID of mounted files, then creates a group and user to match. We can then exec the real command as that user.

Re: How to Replace Docker with Podman on a Mac

#30
post #26
post #16

Is there any practical benefit of Podman over Docker on a Mac? Virtual machine is still needed, so any performance issues are likely to persist (well, maybe Docker for Mac is a bit more buggy, but we can manually setup Docker instead of Podman in a similar way). Also, I think we are losing here access to the Docker socket on the host (inside the virtual machine it can be emulated using docker-podman).

As a typical mac user there is no practical benefit. Being on a Mac is so you can avoid lengthy configurations, scripts and commands and instead have something that just works and is seamlessly integrated. This is the opposite. You’d probably only want to go this route to make a statement about free open source software. But at that point you may as well run Linux

The Docker daemon (likely the HyperKit VM) on the Mac has a tendency to burn CPU cycles, even when there are no containers running. It's pretty common for it to sit at 10-20% of a core all day, and sometimes gets pegged at 100% until you quit.

There are countless closed issues in the GitHub issue tracker [1] for similar issues, but the symptoms don't seem to go away for me or many of my colleagues.

It's been a pretty awful experience on Mac for a long time, so any competition is surely welcome.

[1] https://github.com/docker/for-mac/issues/3499

Post reply on HN