5 ms·
What are the benefits of running Podman Compose instead of Docker Compose? I don't see how it helps with orphan containers, logs and mutable tags.
by pmig 5mo ago
What are the benefits of running Podman Compose instead of Docker Compose? I don't see how it helps with orphan containers, logs and mutable tags.
- whilenot-dev 5mo agoGP is talking about podman with generated systemd unit files (a.k.a. podman quadlet[0]), not the docker-compose-compatible podman-compose ...and I'd agree, systemd can manage services on a system just fine, and even better than any compose workload ever could. journald will help with logs, and the pull policy[1] helps with mutable tags. What help do you need with "orphan containers"? [0]: https://docs.podman.io/en/latest/markdown/podman-quadlet.1.html https://docs.podman.io/en/latest/markdown/podman-quadlet.1.h... [1]: https://docs.podman.io/en/latest/markdown/podman-image.unit.5.html#policy-always https://docs.podman.io/en/latest/markdown/podman-image.unit....
- gear54rus 5mo agoThen you learn podman can't even list containers for all users properly and it kind of starts smelling like the whole ip4 vs ip6 debacle: bunch of vocal proponents wanting you to subject yourself to endless torture for no discernible reason.
- figmert 5mo agoI'm not OP, but the whole podman compose topic gets quite confusing, as initially Podman didn't seem to know what they were trying to do. I've given some more context around it in previous comments. You shouldn't be using podman compose. It's flimsy and doesn't work very well (at least it was last time I used it prior to Podman v3), and I'm pretty sure it doesn't have Red Hat's direct support. Instead, activate Podman's Docker API compatibility socket, and simply set your `DOCKER_HOST` env var to that socket, and from there you can use your general docker client commands such as `docker`, `docker compose` and anything else that uses the Docker API. There are very few things that don't work with this, and the few things that don't are advanced setups. For what it's worth, podman has also a thin wrapper (podman compose) which executes `docker-compose` or the old `podman-compose`. The docs should explain which it picks. Note: - `podman-compose` is an early attempt at remaking `docker-compose` v1 but for Podman. This used parsed the compose config and converts them to podman commands, and executes it. - Later Podman wrote a Docker compatible socket instead, which can work with most docker clis that accept a `DOCKER_HOST` argument, including `docker` and `docker-compose` (both v1 and v2) - `podman compose` is a thin wrapper that automatically selects `docker-compose` or `podman-compose` depending on which is installed. Generally all you need is podman, docker-compose (the v2 binary), and that's it. From there you can use `podman` and/or `podman compose`.
- pydry 5mo agoOne of the nastiest aspects of migrating from docker to podman really is "what to do about docker compose?" coz there are three wildly divergent ways to answer that all of which really suck under certain specific circumstances. Im no fan of docker and podman by itself is a step up but orchestration headaches are enough to ruin that.
- PxldLtd 5mo agoThis is what stopped me from picking up Podman more, all our devs use Docker and have been writing compose files for years now. When the response at the time was "you're using Podman wrong, Quadlets are the hot stuff now" it just felt like too big a risk and commitment to jump to at the time. Have things settled more? Getting away from Docker is a bigger priority nowadays for us.
- pydry 5mo agopodman compose has shifted from "basically never works" to "if an existing YAML isnt too complex it works" but it's not a drop in replacement yet. i also want to stay the hell away from quadlets or any other software which tries to make me use systemd more.
- figmert 5mo ago> "what to do about docker compose?" I don't understand what you're asking here. The answer to that is probably nothing. That is unless you want: - systemd to manage your containers - You want to use K8s primitives (which are mostly compatible) I'm unsure what the 3rd method is you're talking about. The nice thing about Podman's compose API is you don't have to change anything (mostly). You can point all your docker tooling to Podman's socket, and it'll (mostly) magically work.
- pydry 5mo agothe three options are: * use systemd, red hat's favorite kitchen sink for handling everything from setting up sound services to mounting your home dir to logging so why not this too i guess. * docker compose where i have to run a whole separate podman service to lie to docker compose about not actually being docker. * podman compose which would be the obvious solution if it didnt just plain suck.
- greenicon 5mo agoDocker (Compose) has some quirks compared to Podman (Compose), e.g. when using gvisor or a lot of internal networks. Depending on what you do your milage will vary, though.
- kitd 5mo agoAgreed. I found compose overlay files merged list values differently between the Docker and Podman versions, which was a PITA in teams running Docker & Linux dev machines.
- cyberax 5mo agoFWIW, most of these issues were recently fixed in podman-compose. I can now use the current git version of podman-compose interchangeably with docker-compose. And one nice thing about podman-compose is that it's ONE PYTHON FILE. You can just copy it into your source tree.
- cyberax 5mo agoPodman in general is much higher quality than Docker. For the last 5 years, Docker was throwing all kinds of stuff against the wall to see what sticks, neglecting foundational issues. Moreover, podman-compose integrates really easily with systemd. You can create a service by just running "podman-compose systemd" and following the prompt! No quadlet nonsense required.