Hacker News new | ask | show | jobs
by born2discover 1519 days ago
For that Podman provides a nifty little trick: `podman generate systemd`[0] which allows you to generate systemd unit files for your pods and/or containers.

Once generated and enabled, your pods/containers act as systemd services that can be started, stopped etc.

[0]: https://docs.podman.io/en/latest/markdown/podman-generate-sy...

3 comments

This is no longer necessary as of Podman 3.3 or so--there's a single Podman systemd unit that will launch all containers that have restart=always.
Interesting! Do you have by any chance a link the documentation about it, because so far all I could find are links to information about `podman generate systemd`.
That's awesome, I didn't know about that.

Looks like the service is called podman-restart.service on my system.

Yup. I use this for all my home server services like Plex, Adguard, etc.

I reboot my machine after kernel updates and everything comes up flawlessly.

This generator has even better systemd integration: https://github.com/containers/quadlet