Hacker News new | ask | show | jobs
by arthurcolle 1741 days ago
Does this work with compose? Probably not but just wondering
3 comments

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.
Podman 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
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

Anecdotally I can say that I ran into issues with fairly simple files (2 years ago). I’m going to try out the alternatives before coming back to this.
It more or less works, at least on Linux.

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

podman-compose is a thing but it’s not feature complete.