i would like to try… but as far as i know, there is no “docker compose up -d”
Comment on Docker vs Podman, which one to choose for a beginner and why ?
Yoddel_Hickory@lemmy.ca 1 year ago
Podman, rootless containers work well, and there is no central process running everything. I like that starting containers on boot is integrated with systemd.
Discover5164@lemm.ee 1 year ago
MartianSands@sh.itjust.works 1 year ago
Podman supports docker compose just fine. You have to run it as a service, so that it can expose a socket like docker does, but it supports doing exactly that
Yoddel_Hickory@lemmy.ca 1 year ago
Apparently it does! podman-compose
Discover5164@lemm.ee 1 year ago
cool, thank you!
worldofgeese@lemmy.world 1 year ago
Check my post history for an example of a simple bind-mount
compose.yaml
I use for developing a small Python project. It’s exactly the same as Docker Compose (since Podman Compose follows the Compose spec) but if you’re just getting started, it might be a good skeleton to build on.
qaz@lemmy.world 1 year ago
How do you automatically start podman containers?
Yoddel_Hickory@lemmy.ca 1 year ago
I use Quadlet, which is now merged in podman. The only issue I had with it is running system systemd services as other (rootless) users, I can’t get it to create cid files that the users can access. In those cases only, I have to modify the generated services files, which defeats the purpose.
completion@lemmy.one 1 year ago
Check out: docs.podman.io/en/…/podman-systemd.unit.5.html
lemmyvore@feddit.nl 1 year ago
That’s how you do it, you have to write systemd config files for each container. And because it was cumbersome they’ve come up with third party tools that write them for you and launch the container. 😉
lespea@lemmy.world 1 year ago
www.redhat.com/sysadmin/quadlet-podman
witten@lemmy.world 1 year ago
Since I use Docker Compose with Podman, I just make a single systemd service to run Docker Compose on boot, thereby starting all my containers at once.
qaz@lemmy.world 1 year ago
That’s an interesting way to do it. Do you have everything in 1 compose file?
witten@lemmy.world 1 year ago
I have one Compose file per stack, which is an application and all of its containers, databases, etc. Pretty much the same way I organized things with just Docker.