Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I still miss an easy way to setup multiple containers in a single network like with docker-compose. podman-compose is not really useable.


You can use docker-compose with podman.

Through it has similar drawbacks as using docker-compose with docker.

As far as I know there is currently no rootless way on Linux to setup custom internal networks like docker compose does (hence why podman-compose doesn't support such things).


There definitely is a way as creating custom networks works perfectly fine with rootless docker. I'm surprised if podman doesn't support that since it uses rootlesskit (same as rootless docker) which does the heavy lifting for rootless networking.


podman 3.x natively supports docker-compose, but it requires running a podman daemon and has the same drawbacks as docker:

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

That says, you literally can use the same docker-compose app shipped from docker and it works using podman.


An Ansible playbook with the podman_container module is my go-to. It's not as easy because it's less magic but it's also less magic which I count as a win.


You can also use pod files for this, which is nice in that it's easy to migrate to k8s.


What's wrong with it?


With docker all container have their own ip address and (potential) internal DNS name.

But this can't be done rootless.

So with rootless podman all container map to the same ip address but different ports.

This is for some use cases (e.g. spinning up a DB for integration testing) not a problem at all. For others it is.

More over you can run multiple groups of docker containers in separate networks, you can't do so with rootless podman.

Through you can manage networks with rootfull podman (which still has no deamon and as such works better with e.g. capabilities and the audit sub system then docker does).

Through to get the full docker-compose experience you need to run it as a deamon (through systemd) in which case you can use docker-compose with podman but it has most of the problems docker has.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: