Does anyone have resources or advice for someone interested in podman as a replacement for docker-compose? There is a lot I like about podman but my previous exposure to kubernetes felt extremely complicated for my use cases.
Most of the time my docker-compose projects only need to run on one or two machines without much horizontal scaling or fault tolerance and portability/ease of spin-up are more important than high 9s edge cases.
If that's my use case should I just stick with docker-compose, or does podman simplify kubernetes config enough that its worth considering the switch? I'd like the flexibility of being able to deploy to a k8s cluster if the cost is cheap in terms of mental overhead and how easy it is for another developer to pick up and run with.
You can actually use podman as a backend for docker-compose
If you install docker-compose, podman and enable the podman service, it does work quite well.
If you also install podman-docker you basically can run:
`docker-compose`, `docker compose` or `podman compose`, all three will leverage podman in the backend.
I use it with podman rootless and I'm quite happy with it.
Genuine question: I'm curious to know why you deploy with docker-compose and not Docker swarm (eg like described at https://dockerswarm.rocks/ ). I'm deploying the same kind of apps, and ended up with Swarm which seems to fit perfectly. I also found Kubernetes much too complex for my use case. Curious to know why we ended up with different outcomes.
Btw, I also use Compose, but for local runs (of other apps).
I'm not sure how podman fits into this thought but I feel what's needed to make kubernetes as easy to use as docker-compose is a bunch of sane defaults for things that you mostly don't want to care about for smaller projects. And then maybe an option to easily "eject" the configuration when the project grows.
podman can't replace docker-compose. it can only replace docker. if you install podman-docker any docker command you run will be translated to a podman command. I think that should work when you run docker-compose as well.
I like to develop with VS Code and devcontainers. I've never been able to get that setup to work with podman as the backend. Has anyone successfully done this or perhaps know of a blog detailing how to accomplish this that I haven't been able to find?
Yes, I have docker as an alias to root podman and VS Code is able to build a devcontainer with it. Rootless also works but was a lot slower for me. There are a couple of minor incompatibilities I've noticed in other areas:
* Podman doesn't have a unix socket like /var/run/docker.sock but it can be set up with podman-system-service if needed.
* Some applications check if /.dockerenv exists. They shouldn't, but you can just touch a file there to work around it.
I think I did at one point. Podman is 1:1 compatible with the docker CLI. I _think_ VSCode had an option to specify the docker command, in which case you can simply `podman` into it. Alternatively, if that doesn't then you can always put this script in your path as `docker`:
#!/bin/sh
exec podman "$@"
Edit: if you're on Windows then the simplest approach would be to copy podman.exe to docker.exe.
Podman as a devcontainers engine doesn't currently work rootlessly (the default) if you use devcontainer features [1] or (and this sounds like you're issue) if you use WSL2.
I haven't submitted the WSL2 issue to the Podman team yet. If you get to it before I do, can you link it here?
I've worked around the features bug by just using `devbox generate devcontainer` then adding all my desired container apps and services inside a `devbox.json` file.
VS Code devcontainers have been working fine for me with rootless podman in Fedora for over a year now. The one adjustment I had to make was manually provide args to podman to mount the workspace volume:
I've been using VSCode with devcontainers and podman for a couple of months now and everything seems to work fine for me. Is there a particular issue you're hitting?
Just recently set up Podman Desktop on Mac for work (on my old computer, I'd used Rancher Desktop on Windows).
Getting everything installed was a little bit annoying, since I use a nonstandard Homebrew prefix, and Homebrew doesn't currently provide a 'cask' for the pre-built Podman binaries. That means that `brew install --cask podman-desktop` requires building a bunch of things from source for me. But writing one wasn't hard, and the install process was good after that.
One issue I seem to have consistently though is that the VM `podman machine` uses hangs. I haven't investigated it, but I think it might hang every time my laptop sleeps, because it's most often hung when I come back to my computer in the mornings, and that seems so damn near every time.
Correct me if I'm wrong, but I feel like podman is by and for linux devs. Once you move to Mac or Windows, you give up podman's main benefit of running containers without a daemon since you're still having to run a VM.
I was hoping not to read your comment because thats the reason why i stoped playing around with podman.
The frustration of the background VM having some issues on my mac made me switch to paid docker again. I don't have the time to play around with something which i need for work and costs 10$ per month.
Regularly - including at random times not related to sleep. It also randomly blows away mounts on the underlying VM from time to time which means recreating the machine and any images - and every time on qemu update. There have been some very rough edges on Mac for some time now.
podman on macOS has always been a huge pain in the ass for me, but I stick with it anyway.
My podman VM also hangs after putting my M2 Mac to sleep. It's not a big deal for me to restart it in the morning, but it's just about the 1,000th papercut/bug/inconsistency I've encountered.
I'm a very happy podman user. It works really well to run amd64 containers on aarm64 thanks to qemu and it also has great modern features like rootless.
I might look at switching our users over to Podman, considerably less bloat than Docker Desktop. Installing Docker Desktop is a PITA via MDM as it requires the user to have admin rights on first launch (unless they follow additional steps)
It's an electron app, so if you're on Wayland executing like this will make it look decent:
flatpak run io.podman_desktop.PodmanDesktop --enable-features=UseOzonePlatform --ozone-platform=wayland (after also enabling the wayland socket permission).
IIRC, on windows, podman(+ docker) desktop create a Linux HyperV VM, and run the containers on that.
As a Linux native dropped into Windows, I've already been able to bring up docker, podman, k8s, and anything else in linux with more control over the linux VM I've created.
What does the 'Desktop' version of docker or podman bring to windows, that I don't already have by shelling into my on-device VM and using docker/podman tools directly?
Podman on Windows creates a WSL2 distribution (`podman-machine-default` or whatever name one had picked shows up in `wsl --list` right next to other "normal" GNU/Linux distros), it doesn't create any VMs in Hyper-V sense (that show up in Get-VM or HyperV GUI tools).
So, essentially, it's an automation that sets up stuff in WSL for you, plus creates some interoperability from the Windows side such as Docker API named pipe or podman CLI. Nothing you can't do yourself, if you want to do it yourself.
Plus it bundles with those extensions like pre-setup dev Kubernetes or whatever, if you care about those.
Does it support working with a custom default system connection yet? I use podman in parallels because I get way better performance than with the qemu podman machine but podman desktop hasn’t worked with it so I stick to the cli which works seamlessly.
"By default, the VM distribution is Fedora CoreOS except for WSL which is based on a custom Fedora image. While Fedora CoreOS upgrades come out every 14 days, the automatic update mechanism Zincata is disabled by Podman machine."
[+] [-] enragedcacti|2 years ago|reply
Most of the time my docker-compose projects only need to run on one or two machines without much horizontal scaling or fault tolerance and portability/ease of spin-up are more important than high 9s edge cases.
If that's my use case should I just stick with docker-compose, or does podman simplify kubernetes config enough that its worth considering the switch? I'd like the flexibility of being able to deploy to a k8s cluster if the cost is cheap in terms of mental overhead and how easy it is for another developer to pick up and run with.
[+] [-] boudin|2 years ago|reply
If you install docker-compose, podman and enable the podman service, it does work quite well.
If you also install podman-docker you basically can run: `docker-compose`, `docker compose` or `podman compose`, all three will leverage podman in the backend.
I use it with podman rootless and I'm quite happy with it.
[+] [-] raphinou|2 years ago|reply
Btw, I also use Compose, but for local runs (of other apps).
[+] [-] worldsayshi|2 years ago|reply
There has to be some attempt at this right?
[+] [-] luoc|2 years ago|reply
[+] [-] unethical_ban|2 years ago|reply
[+] [-] zamaterian|2 years ago|reply
https://www.redhat.com/sysadmin/compose-podman-pods
[+] [-] R0flcopt3r|2 years ago|reply
[+] [-] TrickardRixx|2 years ago|reply
[+] [-] tedheath123|2 years ago|reply
* Podman doesn't have a unix socket like /var/run/docker.sock but it can be set up with podman-system-service if needed.
* Some applications check if /.dockerenv exists. They shouldn't, but you can just touch a file there to work around it.
[+] [-] zamalek|2 years ago|reply
[+] [-] tao_at_garden|2 years ago|reply
I haven't submitted the WSL2 issue to the Podman team yet. If you get to it before I do, can you link it here?
I've worked around the features bug by just using `devbox generate devcontainer` then adding all my desired container apps and services inside a `devbox.json` file.
[1] https://github.com/containers/podman/issues/18691#issuecomme...
[+] [-] notnullorvoid|2 years ago|reply
[+] [-] vially|2 years ago|reply
[+] [-] neurostimulant|2 years ago|reply
[+] [-] pxc|2 years ago|reply
Getting everything installed was a little bit annoying, since I use a nonstandard Homebrew prefix, and Homebrew doesn't currently provide a 'cask' for the pre-built Podman binaries. That means that `brew install --cask podman-desktop` requires building a bunch of things from source for me. But writing one wasn't hard, and the install process was good after that.
One issue I seem to have consistently though is that the VM `podman machine` uses hangs. I haven't investigated it, but I think it might hang every time my laptop sleeps, because it's most often hung when I come back to my computer in the mornings, and that seems so damn near every time.
Anyone else have this problem on macOS?
[+] [-] joncp|2 years ago|reply
[+] [-] Blehmo|2 years ago|reply
The frustration of the background VM having some issues on my mac made me switch to paid docker again. I don't have the time to play around with something which i need for work and costs 10$ per month.
And i do prefer opensource
[+] [-] LightFog|2 years ago|reply
[+] [-] ragnese|2 years ago|reply
My podman VM also hangs after putting my M2 Mac to sleep. It's not a big deal for me to restart it in the morning, but it's just about the 1,000th papercut/bug/inconsistency I've encountered.
[+] [-] florentbenoit|2 years ago|reply
[+] [-] goalieca|2 years ago|reply
[+] [-] mati365|2 years ago|reply
https://github.com/Mati365/hetzner-podman-bunjs-deploy
[+] [-] cpressland|2 years ago|reply
[+] [-] jpeeler|2 years ago|reply
It's an electron app, so if you're on Wayland executing like this will make it look decent: flatpak run io.podman_desktop.PodmanDesktop --enable-features=UseOzonePlatform --ozone-platform=wayland (after also enabling the wayland socket permission).
[+] [-] emptysongglass|2 years ago|reply
[+] [-] filereaper|2 years ago|reply
I wish more efforts were spent getting better integration with KinD clusters as they're much easier to spinup and work with.
[+] [-] stevanLM|2 years ago|reply
[+] [-] jasonjayr|2 years ago|reply
As a Linux native dropped into Windows, I've already been able to bring up docker, podman, k8s, and anything else in linux with more control over the linux VM I've created.
What does the 'Desktop' version of docker or podman bring to windows, that I don't already have by shelling into my on-device VM and using docker/podman tools directly?
[+] [-] drdaeman|2 years ago|reply
So, essentially, it's an automation that sets up stuff in WSL for you, plus creates some interoperability from the Windows side such as Docker API named pipe or podman CLI. Nothing you can't do yourself, if you want to do it yourself.
Plus it bundles with those extensions like pre-setup dev Kubernetes or whatever, if you care about those.
[+] [-] pjmlp|2 years ago|reply
Also, Windows containers do matter in some environments, and they are exposed via the Docker APIs.
[+] [-] never_inline|2 years ago|reply
[+] [-] dissident_coder|2 years ago|reply
[+] [-] candiddevmike|2 years ago|reply
[+] [-] heffer|2 years ago|reply
Source: https://docs.podman.io/en/latest/markdown/podman-machine-ini...
[+] [-] FPGAhacker|2 years ago|reply
[+] [-] alberth|2 years ago|reply
The website makes some big claims.
https://orbstack.dev/
EDIT: why the downvotes?
[+] [-] unknown|2 years ago|reply
[deleted]
[+] [-] I_am_tiberius|2 years ago|reply