Podman on debian How to fix no podman-auto-update.service
Piotr

Piotr @finloop

About: Software Engineer @software-mansion with 3 years of experience | C++, Python, Data Science | Open Source Contributor

Location:
Lublin, Poland
Joined:
Sep 20, 2021

Podman on debian How to fix no podman-auto-update.service

Publish Date: Apr 12
0 0

This is an issue that can popup when installing podman from a static build Installation on Debian.

To fix it we have to create a update service and timer. These were originally from github repo, but with static podman build they aren’t.

Create directory for

mkdir -p ~/.config/systemd/user/

Enter fullscreen mode Exit fullscreen mode

Create file podman-auto-update.service:

[Unit]
Description=Podman auto-update service
Documentation=man:podman-auto-update(1)
Wants=network-online.target
After=network-online.target

[Service]
Type=oneshot
ExecStart=/usr/local/bin/podman auto-update
ExecStartPost=/usr/local/bin/podman image prune -f

[Install]
WantedBy=default.target

Enter fullscreen mode Exit fullscreen mode

Create file podman-auto-update.timer:

[Unit]
Description=Podman auto-update timer

[Timer]
OnCalendar=daily
RandomizedDelaySec=900
Persistent=true

[Install]
WantedBy=timers.target

Enter fullscreen mode Exit fullscreen mode

Reload units:

systemctl --user daemon-reload; journalctl -f

Enter fullscreen mode Exit fullscreen mode

Enable service and timer:

systemctl --user enable podman-auto-update.service
systemctl --user enable podman-auto-update.timer

Enter fullscreen mode Exit fullscreen mode

Comments 0 total

    Add comment