With docker-compose, containers would start on boot. It was maybe because I had restart: always on.

Is there a way something similar with podman-compose?

I see mentions of creating custom systemd scripts to run podman-compose to start containers, but is there something already baked in podman-compose that I can use?

top 10 comments

sorted by: hot top controversial new old
[–] 8 points 10 months ago (3 children)

Podman Quadlets is what you're after, I think.

  • source
  • hideshow 3 child comments
  • [–] [S] 1 point 10 months ago (2 children)

    I implemented these, but my containers are not starting on system boot. I even set restart: always

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 10 months ago* (1 child)

    Might be obvious but did you enable the Quadlets? So systemctl enable quadlet.service or whatever the equivalent is. I think the quadlet is just a regular systemd unit.

    Edit: I noticed you already got an answer!

  • source
  • parent
  • hideshow 1 child comment
  • [–] 5 points 10 months ago

    Not something baked-in, no, since the entire point of podman is that it's server- (service-)less.

    However they do have a command to manually launch the respective user's podman manager, which IIRC is podman system service -t0 (note: runs in the foreground) so if you add that to a service entry (eg.: via runit user units or systemd user scopes) or just launch it via your user crontab's @reboot, it should work without issues.

    This is literally my runit user unit for podman:

    #!/bin/sh
    export XDG_RUNTIME_DIR=/run/user/1000
    exec podman system service -t0 
    
  • source
  • [+] 2 points 10 months ago (5 children)
  • [–] [S] 1 point 10 months ago (3 children)

    Any idea how I can get Quadlet to start on system boot?

  • source
  • parent
  • hideshow 3 child comments
  • [+] 3 points 10 months ago (2 children)