Live data from Hacker News

How to Replace Docker with Podman on a Mac

redhat.com

51–60 of 90 posts

Re: How to Replace Docker with Podman on a Mac

#51
post #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.

IIRC the podman socket is a planned thing for macOS as it'll be necessary for certain features that rely on the docker socket and don't use SSH, such as VSCode's Remote Containers extension.

However you can create an SSH tunnel to create the socket locally to allow non-podman clients to utilize the socket over SSH with the DOCKER_HOST environment variable.

  # Get URI
  > podman system connection ls

  # Create tunnel
  > ssh -nNT -L/tmp/podman.sock:/run/user/1000/podman/podman.sock -i ~/.ssh/podman-machine-default ssh://core@localhost:[PORT]

  # Export socket location
  > export DOCKER_HOST='/tmp/podman.sock'

https://github.com/containers/podman/issues/11462

https://github.com/containers/podman/issues/11397

Re: How to Replace Docker with Podman on a Mac

#52
Does Podman do a better job avoiding bloat in the development workflow? That’s been a major thing with docker for me, it spins up a new layer whenever I try to do send an arbitrary command to a running vm, which with development (PHP) I find this is something I have to do often, so these layers add up quickly

Re: How to Replace Docker with Podman on a Mac

#53

Earlier quoted context omitted.

podman has no revenue model, it is an open source project managed by https://github.com/containers

So without a revenue model, how would they pay someone to maintain it if the current maintainer[s] need to focus on family or paying their mortgage?

It's from RedHat/IBM. They can give this stuff away to developers because they just want to sell OpenShift to deep pocketed Enterprise customers. And really podman is strategically a defensive move so their Enterprise offerings aren't stuck depending on Docker Inc.

Contrast with Docker, whose business is explicitly focused on "developer tools."

Re: How to Replace Docker with Podman on a Mac

#54
post #22

Earlier quoted context omitted.

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.

What is podman’s revenue model? I am perplexed by the conclusion that charging enterprise customers $5/user-month makes the product’s future less secure.

Because the future of the product now depends on the enterprise customers paying enough for it to not only fund the development but also fund the business backing it.

OSS works best when software is needed by many different enterprises that all need it for their business but it isn’t a direct revenue generator. Because then the future is guaranteed since all of those enterprises will contribute patches and it makes financial sense for any of them to take on the maintainership.

Docker Desktop has always been a single point of failure in development terms not being OSS, but the community of users just got slashed not that there’s a price tag attached to it and by charging Docker has basically said that the future of the product now depends on it turning a profit instead of before when it only depended on Docker Inc overall turning a profit.

Re: How to Replace Docker with Podman on a Mac

#55

Earlier quoted context omitted.

So without a revenue model, how would they pay someone to maintain it if the current maintainer[s] need to focus on family or paying their mortgage?

When I last looked into it, I came away with the feeling that github.com/containers is pretty much RedHat without any official backing.

That’s how Red Hat operates mostly. Time will tell if IBM royally messes this up but Red Hat is an upstream first company. If they need something they will put up the developer time but it will be a community project first that they repackage for RHEL.

Red Hat’s secret sauce so to speak is the stupid amount of ongoing work it takes to actually maintain a distro, not the software itself.

Re: How to Replace Docker with Podman on a Mac

#56

While there do exist several alternatives to Docker Desktop, I am a fan of multipass. Something I don't see anyone talking about, the host to guest volume mounting performance can't be beat. The alternatives can't hold a candle to Docker Desktop's solution. I need this volume mounting to get development code changes into the container in a reasonable time and the alternative performance feels like running on a standa…

Is it possible to setup a mount from within a cloud init?

Re: How to Replace Docker with Podman on a Mac

#57
post #55

Earlier quoted context omitted.

When I last looked into it, I came away with the feeling that github.com/containers is pretty much RedHat without any official backing.

That’s how Red Hat operates mostly. Time will tell if IBM royally messes this up but Red Hat is an upstream first company. If they need something they will put up the developer time but it will be a community project first that they repackage for RHEL. Red Hat’s secret sauce so to speak is the stupid amount of ongoing work it takes to actually maintain a distro, not the software itself.

> Red Hat is an upstream first company

So is IBM from what I've seen.

IBM + RedHat have more contributors working on OSS than Google, surprisingly.

Re: How to Replace Docker with Podman on a Mac

#58

Earlier quoted context omitted.

Does this work with compose? Probably not but just wondering

The problem with making this work, IIRC, is that Docker Compose doesn't actually "compose" Docker commands, but instead _re-implements_ a bunch of functionality itself through its Python libraries. So you'd actually need to bring your own CLI-compatible Docker Compose implementation for Podman rather than just making your Docker replacement compatible.

In addition to the sibling comment (which mentions that you can use the original docker-compose) such a CLI-compatible reimplementation also exists [0]. It's not always a 100% drop-in replacement, but gets you pretty far in my experience.

[0] https://github.com/containers/podman-compose

Re: How to Replace Docker with Podman on a Mac

#59
post #38

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 actually work for you? I tried it and networking was broken out of the box – it couldn’t even pull a container image. I didn’t have time to spend digging into it, however, and would not rule out that being an artifact of our VPN.

If this is using the macOS native virtualization, then, yes, networking will be broken while a vpn is active.

This is a known issue that also was present in the Docker for Apple Silicon public preview where they eventually fixed it by dropping built-in virtualization for qemu

Post reply on HN