1podman-auto-update(1)()                                podman-auto-update(1)()
2
3
4

NAME

6       podman-auto-update   -   Auto  update  containers  according  to  their
7       auto-update policy
8
9

SYNOPSIS

11       podman auto-update
12
13

DESCRIPTION

15       podman auto-update looks up containers with  a  specified  "io.contain‐
16       ers.autoupdate" label (i.e., the auto-update policy).
17
18
19       If  the  label is present and set to "image", Podman reaches out to the
20       corresponding registry to check if the  image  has  been  updated.   An
21       image  is considered updated if the digest in the local storage is dif‐
22       ferent than the one of the remote image.  If an image must be  updated,
23       Podman  pulls  it down and restarts the systemd unit executing the con‐
24       tainer.
25
26
27       At container-creation time, Podman looks up  the  "PODMAN_SYSTEMD_UNIT"
28       environment  variables and stores it verbatim in the container's label.
29       This variable is now set by all systemd units generated by  podman-gen‐
30       erate-systemd and is set to %n (i.e., the name of systemd unit starting
31       the container).  This data  is  then  being  used  in  the  auto-update
32       sequence  to  instruct systemd (via DBUS) to restart the unit and hence
33       to restart the container.
34
35
36       Note  that  podman  auto-update  relies  on  systemd  and  requires   a
37       fully-qualified image reference (e.g., quay.io/podman/stable:latest) to
38       be used to create the container.  This enforcement is necessary to know
39       which  image to actually check and pull.  If an image ID was used, Pod‐
40       man would not know which image to check/pull anymore.
41
42

EXAMPLES

44              # Start a container
45              $ podman run -d busybox:latest top
46              bc219740a210455fa27deacc96d50a9e20516492f1417507c13ce1533dbdcd9d
47
48              # Generate a systemd unit for this container
49              $ podman generate systemd --new --files bc219740a210455fa27deacc96d50a9e20516492f1417507c13ce1533dbdcd9d
50              /home/user/containers/libpod/container-bc219740a210455fa27deacc96d50a9e20516492f1417507c13ce1533dbdcd9d.service
51
52              # Load the new systemd unit and start it
53              $ mv ./container-bc219740a210455fa27deacc96d50a9e20516492f1417507c13ce1533dbdcd9d.service  /.config/systemd/user
54              $ systemctl --user daemon-reload
55              $ systemctl --user start container-bc219740a210455fa27deacc96d50a9e20516492f1417507c13ce1533dbdcd9d.service
56
57              # Auto-update the container
58              $ podman auto-update
59              container-bc219740a210455fa27deacc96d50a9e20516492f1417507c13ce1533dbdcd9d.service
60
61
62

SEE ALSO

64       podman(1), podman-generate-systemd(1), podman-run(1), systemd.unit(5)
65
66
67
68                                                       podman-auto-update(1)()
Impressum