From 59f31d86acdf54019b081ca86340d5c33dbcf3b9 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 15 Jul 2021 11:27:25 +0200 Subject: auto-update: add --dry-run Add a --dry-run flag to `podman auto-update` which will look for new images but won't perform any pull or restart any service or container. The "UPDATED" column will now indicate the availability of a newer image via "pending". ``` $ podman auto-update --dry-run UNIT CONTAINER IMAGE POLICY UPDATED container-test.service 08fd34e533fd (test) localhost:5000/busybox registry false ``` Fixes: #9949 Signed-off-by: Valentin Rothberg --- cmd/podman/auto-update.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd') diff --git a/cmd/podman/auto-update.go b/cmd/podman/auto-update.go index 6ccf4e167..9622088d5 100644 --- a/cmd/podman/auto-update.go +++ b/cmd/podman/auto-update.go @@ -53,6 +53,8 @@ func init() { flags.StringVar(&autoUpdateOptions.Authfile, authfileFlagName, auth.GetDefaultAuthFile(), "Path to the authentication file. Use REGISTRY_AUTH_FILE environment variable to override") _ = autoUpdateCommand.RegisterFlagCompletionFunc(authfileFlagName, completion.AutocompleteDefault) + flags.BoolVar(&autoUpdateOptions.DryRun, "dry-run", false, "Check for pending updates") + flags.StringVar(&autoUpdateOptions.format, "format", "", "Change the output format to JSON or a Go template") _ = autoUpdateCommand.RegisterFlagCompletionFunc("format", common.AutocompleteFormat(autoUpdateOutput{})) } -- cgit v1.2.3-54-g00ecf