lobsters score: 1 · tags: devops, linux, systemd, virtualization

Canonical thread

  • Thanks for the guide. I use docker-compose extensively for my own services. In the context of docker-compose, are there any features you give up or quirks you run into by swapping out docker for podman, or does everything behave exactly the same?

    (I know a lot of folks prefer quadlets for multiple containers on podman, but I don’t want to give up the simplicity of deploying a whole set of services anywhere I want with just two commands: git clone followed by docker compose up -d.)


    score 1 · canonical

  • Officially speaking docker-compose does not support Podman, and you “should” use podman-compose. However, I have been running the setup described here for years and it works fine. You will find, however, that certain edge cases may not be documented; I can’t recall off the top of my head, but I’ve bumped into a few.


    score 1 · canonical

  • There are a few simplifications that can be made to the first step:

    • Generally, podman also includes a systemd socket definition, so you can just skip manually enabling/starting the socket entirely, and systemd will auto-start the service once the socket is interacted with.
    • If you do want to enable another user’s rootless podman session, you can actually just do systemctl --user --machine=USERNAME@.host [...], and it will target that user’s systemd session using the same underlying mechanism as machinectl.

    score 1 · canonical

    • lobsters__exagone313@crustaceanson.theshelf.topOPM
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 month ago

      On my system (Arch Linux), the Podman socket (systemd’s socket activation) is not started by default.

      Good suggestion for the other user part.

      EDIT: It doesn’t seem to work when part of the wheel group, unlike machinectl. Probably requires root.


      score 1 · canonical

      • Try the sudo group, or explicitly setting up the wheel group to have sudo access. Systemd has some sudo integrations, and I dont think “wheel” has the implicit meaning there that it once did.

        (Full disclosure, I’ve never used the docker socket, but I main rootless podman)


        score 1 · canonical

      • On my system (Arch Linux), the Podman socket (systemd’s socket activation) is not started by default.

        Oops I presume I turned it on at some point… I mean, arguably enabling the socket instead of the service is ideal since then podman doesn’t start until you need it…but I presume in practice podman running nothing inside isn’t gonna use very many resources anyway.

        It doesn’t seem to work when part of the wheel group, unlike machinectl.

        oh…what? I guess this somehow doesn’t go through polkit at all, or follows some different path? There’s a recent open issue too: https://github.com/systemd/systemd/issues/41071


        score 1 · canonical

        • I moved my deployments to Podman Quadlet too. Wanted to make an article for this at first but it is a too large chunk to write.

          I still use docker-compose at work (for development purposes), when I get a Linux machine. It’s easier to show that I’m using the same tool as everyone (while underlying it’s not really Docker).


          score 1 · canonical