Podman can pretend to be Docker

And thus make docker-compose work quite nicely!

I was recently trying to run a big docker-compose.yml setup using podman-compose and it took ages to spin up and then didn’t work. But apparently you don’t have to, because podman system service serves up a Docker API replacement which then can transparently be used by docker-compose.

First, start up podman system service --time=0 unix://$PWD/podman.sock somewhere to have podman serve up the api.

Then, run DOCKER_HOST=unix://$PWD/podman.sock docker-compose up to start up docker-compose as usual.

I didn’t play around with it for too long, but it seems to work quite well at a glance. Much faster and prettier (colourful output, better separation between docker-compose vs container output).

Apparently this has been a thing since 2021 and this article has some info on how to start this up as a systemd service. (I personally did not want to do that because I want podman to run as non-root/my own user, but even that should be possible using systemctl --user.)