podman-auto-update(1)
β¨ podman-auto-update β bestie edition β¨
okay so this is the podman-auto-update manual page from the General Commands Manual, and babes, it is literally about letting your containers update THEMSELVES. no cap. π¦
πΈ NAME πΈ
podman-auto-update β auto update containers according to their auto-update policy π
π SYNOPSIS π
podman auto-update [options]
β¨ DESCRIPTION β¨
So podman auto-update pulls down new container images and restarts containers that are configured for auto updates. That's it, that's the whole vibe. π
But here's the thing bestie β to even use auto updates, the container or Kubernetes workloads must run inside a systemd unit. After an image updates successfully, the containers using that image get updated by restarting the systemd units they run in. Wanna know how to run Podman under systemd? Go read podman-systemd.unit(5). go go go πββοΈ
To configure a container for auto updates, it has to be created with the io.containers.autoupdate label, or the AutoUpdate field in podman-systemd.unit(5), set to one of these two values:
registryβ If the label is present and set toregistry, Podman reaches out to the corresponding registry to check if the image has been updated. The labelimageis an alternative toregistrymaintained for backwards compatibility. An image counts as updated if the digest in the local storage is different than the one of the remote image. If an image must be updated, Podman pulls it down and restarts the systemd unit executing the container. Lowkey important: theregistrypolicy requires a fully-qualified image reference (e.g.,quay.io/podman/stable:latest) to be used to create the container. This enforcement is necessary to know which image to actually check and pull. If an image ID was used, Podman would not know which image to check/pull anymore. πlocalβ If the autoupdate label is set tolocal, Podman compares the image digest of the container to the one in the local container storage. If they differ, the local image is considered to be newer and the systemd unit gets restarted. slay β¨
π§ Auto Updates and Kubernetes YAML π§
Podman supports auto updates for Kubernetes workloads too, bestie. The auto-update policy can be configured directly via podman-systemd.unit(5) or inside the Kubernetes YAML with these Podman-specific annotations:
io.containers.autoupdate: "registry|local"β applies the auto-update policy to all containersio.containers.autoupdate/$container: "registry|local"β applies the auto-update policy to$containeronlyio.containers.sdnotify: "conmon|container"β applies the sdnotify policy to all containersio.containers.sdnotify/$container: "conmon|container"β applies the sdnotify policy to$containeronly
By default, the autoupdate policy is set to "disabled", and the sdnotify policy is set to "conmon". periodt π
π Systemd Unit and Timer π
Podman ships with a podman-auto-update.service systemd unit. This unit is triggered daily at midnight by the podman-auto-update.timer systemd timer. β° The timer can be altered for custom time-based updates if you want. The unit can further be invoked by other systemd units (e.g., via the dependency tree) or manually via systemctl start podman-auto-update.service. main character energy fr fr π
π OPTIONS π
--authfile=pathβ Path of the authentication file. Default is${XDG_RUNTIME_DIR}/containers/auth.jsonon Linux, and$HOME/.config/containers/auth.jsonon Windows/macOS. The file is created bypodman login. If the authorization state is not found there,$HOME/.docker/config.jsonis checked, which is set usingdocker login.
Note: There is also the option to override the default path of the authentication file by setting the REGISTRY_AUTH_FILE environment variable. This can be done with export REGISTRY_AUTH_FILE=path.
Alternatively, the io.containers.autoupdate.authfile container label can be configured. In that case, Podman will use the specified label's value instead. π«Ά
--dry-runβ Check for the availability of new images but do not perform any pull operation or restart any service or container. TheUPDATEDfield indicates the availability of a new image with"pending". no notes, iconic π--format=formatβ Change the default output format. This can be of a supported type like'json'or a Go template. Valid placeholders for the Go template are listed below:.Containerβ ID and name of the container.ContainerIDβ ID of the container.ContainerNameβ Name of the container.Imageβ Name of the image.Policyβ Auto-update policy of the container.Unitβ Name of the systemd unit.Updatedβ Update status:true,false,failed,pending
--rollbackβ If restarting a systemd unit after updating the image has failed, rollback to using the previous image and restart the unit another time. Default istrue.
Note that detecting if a systemd unit has failed is best done by the container sending the READY message via SDNOTIFY. This way, restarting the unit waits until having received the message or a timeout kicked in. Without that, restarting the systemd unit may succeed even if the container has failed shortly after. π
For a container to send the READY message via SDNOTIFY it must be created with the --sdnotify=container option (see podman-run(1)). The application running inside the container can then execute systemd-notify --ready when ready, or use the sdnotify bindings of the specific programming language (e.g., sd_notify(3)). π§
--tls-verifyβ Require HTTPS and verify certificates when contacting registries (default:true). If explicitly set totrue, TLS verification is used. If set tofalse, TLS verification is not used. If not specified, TLS verification is used unless the target registry is listed as an insecure registry incontainers-registries.conf(5). π₯
π EXAMPLES π
Create a Quadlet file configured for auto updates:
$ cat ~/.config/containers/systemd/sleep.container
[Container]
Image=registry.fedoraproject.org/fedora:latest
Exec=sleep infinity
AutoUpdate=registry
Generate a systemd service from the Quadlet file by reloading the systemd user daemon:
$ systemctl --user daemon-reload
Start the systemd service and make sure the container is running:
$ systemctl --user start sleep.service
$ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f8e4759798d4 registry.fedoraproject.org/fedora:latest sleep infinity 2 seconds ago Up 2 seconds systemd-sleep
Check if a new image is available via --dry-run:
$ podman auto-update --dry-run --format "{{.Image}} {{.Updated}}"
registry.fedoraproject.org/fedora:latest pending
Update the service:
$ podman auto-update
UNIT CONTAINER IMAGE POLICY UPDATED
sleep.service f8e4759798d4 (systemd-sleep) registry.fedoraproject.org/fedora:latest registry true
π SEE ALSO π
podman(1), podman-generate-systemd(1), podman-run(1), podman-systemd.unit(5), sd_notify(3), systemd.unit(5)
okay that's the whole page bestie, you ate that π this was podman-auto-update(1) from the General Commands Manual, and the source/version + date at the bottom say podman-auto-update(1) β go forth and let your containers update themselves, mwah π«Άβ¨
π¦ where this page comes from
- arch rolling: podman-docker 6.1.4-1 Β· Apache-2.0
- fedora 43: podman-docker 5:5.6.2-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 43: podman-docker 5:5.8.4-1.fc43
- fedora 43: podman-docker 5:5.8.8-1.fc43
- fedora 43: podman-docker 5:5.8.9-1.fc43 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: podman-docker 5:5.8.1-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- fedora 44: podman-docker 5:5.8.7-1.fc44
- fedora 44: podman-docker 5:5.8.9-1.fc44 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- ubuntu resolute: podman-docker 5.7.0+ds2-3build1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms