mirror of
https://github.com/containers/podman.git
synced 2025-10-14 09:45:59 +08:00

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>
22 lines
662 B
SYSTEMD
22 lines
662 B
SYSTEMD
# This service runs once each boot to remove potential leftover
|
|
# container state from previous boots.
|
|
|
|
# This is needed when using transient storage mode in podman where the
|
|
# database and other configs are stored in tmpfs, but some other files
|
|
# are not. If we don't run this after an unclean boot then there may
|
|
# be some leftover files that grow over time.
|
|
|
|
[Unit]
|
|
Description=Clean up podman transient data
|
|
RequiresMountsFor=%t/containers
|
|
Documentation=man:podman-system-prune(1)
|
|
Requires=boot-complete.target
|
|
After=local-fs.target boot-complete.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=@@PODMAN@@ system prune --external
|
|
|
|
[Install]
|
|
WantedBy=default.target
|