spiegel_podman/cmd/podman
Valentin Rothberg f4e873c4e1 auto updates
Add support to auto-update containers running in systemd units as
generated with `podman generate systemd --new`.

`podman auto-update` looks up containers with a specified
"io.containers.autoupdate" label (i.e., the auto-update policy).

If the label is present and set to "image", Podman reaches out to the
corresponding registry to check if the image has been updated.  We
consider an image to be 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 container.  Note that the
restarting sequence relies on systemd.

At container-creation time, Podman looks up the "PODMAN_SYSTEMD_UNIT"
environment variables and stores it verbatim in the container's label.
This variable is now set by all systemd units generated by
`podman-generate-systemd` and is set to `%n` (i.e., the name of systemd
unit starting the container).  This data is then being used in the
auto-update sequence to instruct systemd (via DBUS) to restart the unit
and hence to restart the container.

Note that this implementation of auto-updates relies on systemd and
requires a fully-qualified image reference to be used to create the
container.  This enforcement is necessary to know which image to
actually check and pull.  If we used an image ID, we would not know
which image to check/pull anymore.

Fixes: #3575
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-03-17 17:18:56 +01:00
..
cliconfig auto updates 2020-03-17 17:18:56 +01:00
libpodruntime Refactor runtime functions to pass options structure 2020-02-07 13:45:29 +01:00
remoteclientconfig use storage/pkg/homedir 2020-03-09 08:57:23 +01:00
shared auto updates 2020-03-17 17:18:56 +01:00
varlink Refactor image tree for API usage 2020-02-17 11:12:35 +01:00
attach.go Use terminal detach keys sequence specified in the config file 2019-12-06 09:30:26 +01:00
autoupdate.go auto updates 2020-03-17 17:18:56 +01:00
build.go add os|arch attributes when building 2020-03-15 12:49:42 -05:00
checkpoint.go podman rm/stop --cidfile 2019-11-18 14:44:08 +01:00
cleanup.go Add the rmi flag to podman-run to delete container image 2020-03-03 14:27:11 +02:00
commands.go auto updates 2020-03-17 17:18:56 +01:00
commands_remoteclient.go Implement healthcheck for remote client 2019-08-19 12:14:54 -04:00
commit.go Update documentation of commit command to show image reference is optional 2020-02-15 11:11:00 +01:00
common.go Add --no-healthcheck command to create/run 2020-02-22 12:45:15 -06:00
common_libpod.go make lint: enable gocritic 2020-01-13 14:27:02 +01:00
container.go podman-remote: cp crashes 2019-08-21 14:53:23 -05:00
containers_prune.go Merge pull request #4845 from baude/pruneforce 2020-01-13 21:45:13 +01:00
cp.go make lint: enable gocritic 2020-01-13 14:27:02 +01:00
create.go seperate container create network options 2020-02-03 15:30:17 -06:00
diff.go golangci: enable goimports 2020-03-05 20:03:44 +01:00
errors.go Add new exit codes to rm & rmi for running containers & dependencies 2019-08-01 03:40:29 -04:00
errors_remote.go Add codespell to validate spelling mistakes in code. 2020-01-11 06:32:19 -05:00
events.go first pass of corrections for golangci-lint 2019-07-10 15:52:17 -05:00
exec.go allow exec to read files of environment variables 2019-12-11 09:21:24 -06:00
exists.go first pass of corrections for golangci-lint 2019-07-10 15:52:17 -05:00
export.go first pass of corrections for golangci-lint 2019-07-10 15:52:17 -05:00
generate.go generate systemd: drop support for remote clients 2019-08-21 09:41:07 +02:00
generate_kube.go first pass of corrections for golangci-lint 2019-07-10 15:52:17 -05:00
generate_systemd.go podman-generate-systemd --new 2020-01-09 16:12:12 +01:00
healthcheck.go Implement healthcheck for remote client 2019-08-19 12:14:54 -04:00
healthcheck_run.go Implement conmon exec 2019-07-22 15:57:23 -04:00
history.go make lint: enable gocritic 2020-01-13 14:27:02 +01:00
image.go Add untag sub-command 2020-01-08 10:06:10 +01:00
images.go remove imagefilter for varlink remote client 2020-03-12 12:43:32 -05:00
images_prune.go Add codespell to validate spelling mistakes in code. 2020-01-11 06:32:19 -05:00
import.go goland autocorrections 2019-10-29 12:18:50 -05:00
info.go Fixed the JSON go template format for the 'info' action 2019-11-01 23:36:17 -04:00
init.go podman rm/stop --cidfile 2019-11-18 14:44:08 +01:00
inspect.go inspect: rename ImageID go field to Image 2019-10-15 12:16:47 +02:00
kill.go signal parsing - better input validation 2019-12-26 16:50:21 -07:00
load.go Allow users to set TMPDIR environment 2020-03-06 10:21:37 -05:00
login.go Warn user about --password cli option in login 2020-02-20 15:27:01 +05:30
logout.go fix mandatory parameter in login/logout 2020-02-18 15:30:49 -05:00
logs.go Merge pull request #5244 from Akasurde/i4962 2020-02-28 18:55:58 +01:00
main.go add default network for apiv2 create 2020-03-06 14:31:45 -06:00
main_local.go hide --trace flag 2020-03-10 08:33:39 +01:00
main_remote.go Allow setting default parameters with env vars 2019-10-01 19:46:57 +02:00
main_remote_supported.go enable windows remote client 2019-08-08 20:05:08 -05:00
main_remote_windows.go enable windows remote client 2019-08-08 20:05:08 -05:00
mount.go podman rm/stop --cidfile 2019-11-18 14:44:08 +01:00
network.go podman network create 2019-09-09 09:32:43 -05:00
network_create.go macvlan networks 2019-12-09 08:40:40 -06:00
network_inspect.go inclusion of podman network 2019-08-15 12:49:12 -05:00
network_list.go golangci: enable goimports 2020-03-05 20:03:44 +01:00
network_rm.go enhance podman network rm 2019-09-12 14:03:52 -05:00
pause.go Use exit code constants 2019-09-12 16:20:01 -04:00
platform_linux.go rootless: skip check fo /etc/containers/registries.conf 2019-05-30 09:01:55 +02:00
platform_unsupported.go Add darwin support for remote-client 2019-01-11 11:30:28 -06:00
play.go More cleanup for failures on missing commands. 2019-03-08 07:06:50 -05:00
play_kube.go play kube: make seccomp handling better conform to k8s 2020-01-03 13:27:17 -05:00
pod.go Add podman pod prune 2019-04-16 11:23:18 -04:00
pod_create.go Add network options to podman pod create 2020-02-19 11:29:30 -05:00
pod_inspect.go first pass of corrections for golangci-lint 2019-07-10 15:52:17 -05:00
pod_kill.go signal parsing - better input validation 2019-12-26 16:50:21 -07:00
pod_pause.go golangci: enable goimports 2020-03-05 20:03:44 +01:00
pod_ps.go make lint: enable gocritic 2020-01-13 14:27:02 +01:00
pod_restart.go podman rm/stop --cidfile 2019-11-18 14:44:08 +01:00
pod_rm.go Remove containers when pruning a stopped pod. 2019-11-26 13:19:31 -05:00
pod_start.go podman rm/stop --cidfile 2019-11-18 14:44:08 +01:00
pod_stats.go make lint: enable gocritic 2020-01-13 14:27:02 +01:00
pod_stop.go podman {pod,} rm/stop: add --ignore flag 2019-11-25 09:48:13 +01:00
pod_top.go man pages: fix inconsistencies 2020-03-10 15:03:59 -06:00
pod_unpause.go podman rm/stop --cidfile 2019-11-18 14:44:08 +01:00
pods_prune.go Remove containers when pruning a stopped pod. 2019-11-26 13:19:31 -05:00
port.go Friendly amendment: tests, and a help message 2020-02-23 11:04:39 -06:00
ps.go Only set --all when a status filter is given to ps 2020-02-12 20:14:20 -05:00
pull.go cmd/podman/pull: refactor code 2020-02-12 15:11:17 +01:00
push.go Hidden remote flags can be nil 2020-01-26 14:53:22 -06:00
README.md Replace "podman" with "Podman" 2019-09-07 20:16:42 +08:00
refresh.go first pass of corrections for golangci-lint 2019-07-10 15:52:17 -05:00
reset.go Add codespell to validate spelling mistakes in code. 2020-01-11 06:32:19 -05:00
restart.go podman rm/stop --cidfile 2019-11-18 14:44:08 +01:00
restore.go podman rm/stop --cidfile 2019-11-18 14:44:08 +01:00
rm.go Add basic deadlock detection for container start/remove 2020-02-24 09:29:34 -05:00
rmi.go make lint: enable gocritic 2020-01-13 14:27:02 +01:00
run.go Add the rmi flag to podman-run to delete container image 2020-03-03 14:27:11 +02:00
runlabel.go man page cross-reference fixes: part 2 2020-03-11 11:05:37 -06:00
save.go first pass of corrections for golangci-lint 2019-07-10 15:52:17 -05:00
search.go fix bug check nonexist authfile 2019-11-05 21:32:18 -05:00
service.go Remove 1 sec delay 2020-02-25 11:04:20 -07:00
service_dummy.go Add service endpoint 2020-01-21 16:35:45 -06:00
sign.go Fix podman image sign help output 2020-03-04 09:22:53 +01:00
start.go Use terminal detach keys sequence specified in the config file 2019-12-06 09:30:26 +01:00
stats.go make lint: enable gocritic 2020-01-13 14:27:02 +01:00
stop.go podman {pod,} rm/stop: add --ignore flag 2019-11-25 09:48:13 +01:00
system.go Add podman system reset command 2019-11-29 05:34:52 -05:00
system_df.go fix system df crashes on unnamed images 2019-08-04 10:00:29 -04:00
system_migrate.go Migrate can move containers to a new runtime 2019-10-10 10:25:06 -04:00
system_prune.go Merge pull request #4845 from baude/pruneforce 2020-01-13 21:45:13 +01:00
system_renumber.go Discard errors from Shutdown in system renumber 2019-11-22 17:27:06 -05:00
tag.go Update tag documentation regarding 'alias' usage 2020-01-17 08:51:36 +01:00
top.go first pass of corrections for golangci-lint 2019-07-10 15:52:17 -05:00
tree.go Refactor image tree for API usage 2020-02-17 11:12:35 +01:00
trust.go podman-remote image trust is broken 2019-09-11 16:03:45 -04:00
trust_set_show.go golangci-lint round #3 2019-07-21 14:22:39 -05:00
umount.go podman rm/stop --cidfile 2019-11-18 14:44:08 +01:00
unpause.go Use exit code constants 2019-09-12 16:20:01 -04:00
unshare.go libpod removal from main (phase 2) 2019-06-27 07:56:24 -05:00
untag.go Add untag sub-command 2020-01-08 10:06:10 +01:00
utils.go Remove c.String(net) 2020-01-16 09:23:32 -05:00
varlink.go Add service endpoint 2020-01-21 16:35:45 -06:00
varlink_dummy.go Only build varlink when buildtag is available 2019-02-12 15:53:19 -06:00
version.go Fix podman-remote version to print client and server 2019-12-02 15:50:00 +01:00
volume.go More cleanup for failures on missing commands. 2019-03-08 07:06:50 -05:00
volume_create.go Rework label parsing 2020-02-14 16:06:20 -05:00
volume_inspect.go Swap 'volume inspect' frontend to use the new backend 2019-08-02 15:08:30 -04:00
volume_ls.go make lint: enable gocritic 2020-01-13 14:27:02 +01:00
volume_prune.go Add codespell to validate spelling mistakes in code. 2020-01-11 06:32:19 -05:00
volume_rm.go Add function for looking up volumes by partial name 2019-09-09 12:06:10 -04:00
wait.go first pass of corrections for golangci-lint 2019-07-10 15:52:17 -05:00

Podman - Simple debugging tool for pods and images

Podman is a daemonless container runtime for managing containers, pods, and container images. It is intended as a counterpart to CRI-O, to provide low-level debugging not available through the CRI interface used by Kubernetes. It can also act as a container runtime independent of CRI-O, creating and managing its own set of containers.

Use cases

  1. Create containers
  2. Start, stop, signal, attach to, and inspect existing containers
  3. Run new commands in existing containers
  4. Push and pull images
  5. List and inspect existing images
  6. Create new images by committing changes within a container
  7. Create pods
  8. Start, stop, signal, and inspect existing pods
  9. Populate pods with containers