mirror of
https://github.com/containers/podman.git
synced 2025-05-21 09:05:56 +08:00

Extend the systemd auto-update service to prune images after an update has run. As reported by a user [1], auto updates can over time cause the disk to run out of space. With Edge being a target use case, we need to make sure that systems can run without much supervision, so let's make sure to run `podman image prune` to clean up dangling images. [1] https://twitter.com/r_isc_y/status/1388981737011793921 Fixes: #10190 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Setting up Podman service for systemd socket activation
system-wide (podman service run as root)
- copy the
podman.service
andpodman.socket
files into/etc/systemd/system
systemctl daemon-reload
systemctl enable podman.socket
systemctl start podman.socket
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")
mkdir -p ~/.config/systemd/user
- copy the
podman.service
andpodman.socket
files into~/.config/systemd/user
systemctl --user enable podman.socket
systemctl --user start podman.socket
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.