ikke-t / podman-container-systemd

creates systemd files and creates containers using podman
118 stars 44 forks source link

configure rootless container in root systemd #70

Open hmoffatt opened 1 year ago

hmoffatt commented 1 year ago

You can run podman rootless but still run it from regular root systemd, by specifying User=rootless_user in the service.

This makes it easier to restart the service, as root can do it as a normal service rather than having to switch user and use systemctl --user.

This still requires lingering for the rootless user. I think the only changes needed to the role would be the path to the systemd unit, and to add the User= line to the service file.