podman/contrib/systemd
Alexander Larsson ddeb9592c9 Add podman-clean-transient.service service
This is a unit that can be enabled when using transient store mode
to clean up potential leftovers from previous boots. All it does is
run "podman system prune --external" once each boot.

Signed-off-by: Alexander Larsson <alexl@redhat.com>
2022-12-20 10:24:25 +01:00
..
auto-update systemd: replace multi-user with default.target 2021-11-30 14:37:25 +01:00
system Add podman-clean-transient.service service 2022-12-20 10:24:25 +01:00
README.md [CI:DOCS] fix default branch links 2022-01-15 20:56:19 +01:00
user systemd: symlink user->system 2020-07-20 11:12:41 +02:00

README.md

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.