podman/contrib/systemd
Daniel J Walsh afb7afe2f1
podman.service should be an exec service not a notify service
Podman never notifies sytemd that it is ready to recieve connections
so systemd kills it after waiting 1.5 minutes.  Changing to exec
should leave it running until podman exits or the service is stopped.

https://github.com/containers/podman/issues/8751

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2020-12-16 13:20:39 -05:00
..
auto-update Set podman-auto-update.service Type=oneshot 2020-11-13 11:10:36 +01:00
system podman.service should be an exec service not a notify service 2020-12-16 13:20:39 -05:00
README.md Switch all references to github.com/containers/libpod -> podman 2020-07-28 08:23:45 -04:00
user systemd: symlink user->system 2020-07-20 11:12:41 +02:00

Setting up Podman service for systemd socket activation

system-wide (podman service run as root)

  1. copy the podman.service and podman.socket files into /etc/systemd/system
  2. systemctl daemon-reload
  3. systemctl enable podman.socket
  4. systemctl start podman.socket
  5. systemctl status podman.socket podman.service

Assuming the status messages show no errors, the libpod service is ready to respond to the APIv2 on the unix domain socket /run/podman/podman.sock

podman.service

You can refer to this example for a sample podman.service file.

podman.socket

You can refer to this example for a sample podman.socket file.

user (podman service run as given user aka "rootless")

  1. mkdir -p ~/.config/systemd/user
  2. copy the podman.service and podman.socket files into ~/.config/systemd/user
  3. systemctl --user enable podman.socket
  4. systemctl --user start podman.socket
  5. systemctl --user status podman.socket podman.service

Assuming the status messages show no errors, the libpod service is ready to respond to the APIv2 on the unix domain socket /run/user/$(id -u)/podman/podman.sock

podman.service

You can refer to this example for a rootless podman.service file.

podman.socket

You can refer to this example for a rootless podman.socket file.