Automatically update containers by using systemd
Schedule automatic container updates by using the podman-auto-update timer and service. This helps ensure your system regularly checks for and applies image updates without manual intervention.
Before you begin
- The
container-toolsmeta-package is installed.
About this task
As mentioned in section Automatically updating containers by using Podman, you can update the container by using the podman auto-update command. It integrates into custom scripts and can be invoked when needed. Another way to auto update the containers is to use the pre-installed podman-auto-update.timer and podman-auto-update.servicesystemd service.
The podman-auto-update.timer can be configured to trigger auto updates at a specific date or time. The podman-auto-update.service can further be started by the systemctl command or be used as a dependency by other systemd services.
As a result, auto updates based on time and events can be triggered in various ways to meet individual needs and use cases.
Starting with Podman v4.6, you can use the Quadlets that describe how to run a container in a format similar to regular systemd unit files and hides the complexity of running containers under systemd.