9 ms·
How to Replace Docker with Podman on a Mac
- lpasselin 5y agoNow there is `podman machine` which makes most of this article outdated.
- conceptme 5y agoIt is mentioned in the article. "Fast forward a couple of months, podman-machine is now deprecated in lieu of Vagrant"
- cpitman 5y agoThat'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.
- gizdan 5y agoAnd it is built into the podman binary, as opposed to being a separate project.
- lpasselin 5y agoI assume `podman-machine` is different than `podman machine` See Marcos install https://podman.io/getting-started/installation https://podman.io/getting-started/installation Also there are active issues and PR related to `podman machine`.
- afbjorklund 5y agoYes, Red Hat reused the name - similar to the CoreOS name.
- geerlingguy 5y agoSo is a Vagrant-based alternative the current solution? Vagrant seems like it's long been a 'maintenance only' project for Hashicorp, though not abandoned at least.
- inyorgroove 5y agoI don't think this is correct. They are currently working on a go based replacement (3.0).
- roywashere 5y agoAlso vagrant by default depends on virtualbox, and that is x86-only so it does not work on your M1 Mac, or your Pinebook : )
- mnutt 5y agoI believe there are hypervisor.framework backends for vagrant, but it seems that for whatever reason they haven’t taken off? I’m not exactly sure why they haven’t become the default on Mac, given how much more efficient it presumably is.
- afbjorklund 5y agoVagrant was a workaround, before the new project got off the ground: https://boot2podman.github.io/2020/07/22/machine-replacement.html https://boot2podman.github.io/2020/07/22/machine-replacement... Any virtualization solution could be used, with some more typing (like running the shell commands directly). It's not unique to Vagrant.
- afbjorklund 5y agoLima is a new and better option for this, it does not use a bundled Ruby runtime and does not use anything from Oracle. Just Go and QEMU... See https://github.com/lima-vm/lima https://github.com/lima-vm/lima
- afbjorklund 5y agoSee https://boot2podman.github.io/2020/07/05/boot2docker-deprecated.html https://boot2podman.github.io/2020/07/05/boot2docker-depreca... for the reasons why Vagrant was/is a workaround, after docker-machine and podman-machine stopped working.
- inyorgroove 5y agoWhile 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 standard hard drive compared to nvme ssd.
- filmgirlcw 5y agoI like Multipass a ton, but as with almost every Docker/VM/Linux config right now, support on the M1 Mac is mixed. (Yes, yes, I know Docker Desktop works on the M1 now. But not all container images do, some run emulated, some break, there are still lots of papercuts.) I’ve had some success with the most recent builds of Multipass, but it isn’t reliable. For devs who still have access to an Intel Mac, I personally would still use that over an M1 for container/VM/Linux tasks. We’re only a year into the transition so that’s OK, but don’t be caught off guard if you move to an M1 and find your stuff breaking. Incidentally, this is where I find stuff like GitHub Codespaces really nice because I can offload the container bits to a different machine.
- easton 5y agoThat might be a fun project if Hacktoberfest comes back this year, get open source projects building images for arm64. A lot of times it’s easy to do.
- filmgirlcw 5y agoThat’s actually a great idea!!
- pacifika 5y agoIs it possible to setup a mount from within a cloud init?
- 5y ago
- williamsmj 5y agoMy 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-to-podman/ 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 https://github.com/containers/podman/issues/10577 (which is WIP, and may have been resolved by https://github.com/containers/podman/pull/11451 https://github.com/containers/podman/pull/11451).
- arthurcolle 5y agoDoes this work with compose? Probably not but just wondering
- Spivak 5y agopodman-compose is a thing but it’s not feature complete.
- jagger27 5y agoIt more or less works, at least on Linux. https://www.redhat.com/sysadmin/podman-docker-compose https://www.redhat.com/sysadmin/podman-docker-compose
- jeffparsons 5y agoThe 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.
- judge2020 5y agoPodman solved this by just re-implementing docker’s socket API (which does mean it now requires a daemon to use compose) https://www.redhat.com/sysadmin/podman-docker-compose https://www.redhat.com/sysadmin/podman-docker-compose
- gjs278 5y agohilarious. the article is already outdated. the truth is nobody should be using docker. the tools are fickle and nobody knows how they actually work. stick with VMs.
- deleted 5y ago[deleted]
- throwaway234565 5y agoHow does this compare to multipass? I tried multipass out on an Intel Mac yesterday and it worked great until I connected to corporate vpn (anyconnect) and then it all went downhill. Tried some of the workarounds (https://multipass.run/docs/troubleshooting-networking-on-macos#network-routing-problems https://multipass.run/docs/troubleshooting-networking-on-mac...) but no luck. Back to Docker Desktop.
- suchar 5y agoIs 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).
- Spivak 5y agoNot 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.
- afarrell 5y agoWhat 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.
- mweberxyz 5y agopodman has no revenue model, it is an open source project managed by https://github.com/containers https://github.com/containers
- afarrell 5y agoSo 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?
- nemothekid 5y agoWhen I last looked into it, I came away with the feeling that github.com/containers is pretty much RedHat without any official backing.
- mbell 5y agoIs there is a solution for using `docker-compose` on mac with podman? I know that podman supports it natively now, and there is `podman-compose`, but I couldn’t find much on getting either working on a mac due to the remote setup.
- swlkr 5y agoI tried podman on an intel mac and everything worked except mounting volumes
- jagger27 5y agoVolumes 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.
- haberman 5y agoI'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.
- cpuguy83 5y agoThere is some support for id mapping in the 5.12 kernel that we may be able to take advantage of for this case. Will have to take a look at how to deal with this for things like volumes. https://man7.org/linux/man-pages/man2/mount_setattr.2.html#NOTES https://man7.org/linux/man-pages/man2/mount_setattr.2.html#N...
- tambourine_man 5y agoIs Vagrant still actively used? I was all over it some 4-5 years ago. I remember HashiCorp even favoring a newer product they were trying to promote.
- deleted 5y ago[deleted]
- leetrout 5y agoYes and its moving to HCL and Go https://www.hashicorp.com/blog/toward-vagrant-3-0 https://www.hashicorp.com/blog/toward-vagrant-3-0
- while1fork 5y agoI replaced docker desktop on my Mac with the CLI brew version and set DOCKER_HOST. This is because my 96-core, 0.5 TB RAM Linux server can run it just a wee bit faster than an old Mac mini.
- deathanatos 5y agoThis feels like the whole industry is now all going through the same motions… I tried podman; two hurdles I haven't figured out: 1/ sending the context is incredibly slow on podman, compared to Docker+Buildkit. It's definitely trying to send literally the entire context, like Docker without Buildkit does, but even more slowly… 2/ private registry auth. Haven't really tried too hard, but it's not just "a drop in replacement"; I think I need to somehow auth with podman specifically. (Part of this is our external registry is ACR, and we auth with `az`, but I think `az` is presuming Docker…)
- spockz 5y agoYou can use `az acr login --name <acrName> --expose-token` to get the token and pass it to the pod man login.
- CR007 5y agoWe replaced Docker hub with ghcr + buildah action and we won't ever look back! We are just waiting for more compose support which seems that will happen shortly anyway. Thanks redhat!
- mikesabbagh 5y agobest thing about podman is the -l option, that refers to last image used for example to see the last conatainer's logs: podman logs -l just beautiful!
- no_wizard 5y agoDoes 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
- hendry 5y agoI tried podman on my MBP and didn't get very far :/ https://github.com/containers/podman/issues/11479 https://github.com/containers/podman/issues/11479
- chrisweekly 5y agoSee https://news.ycombinator.com/item?id=28379556 https://news.ycombinator.com/item?id=28379556 for a recent discussion about minikube (the only drop-in replacement for Docker Desktop).