summaryrefslogtreecommitdiff
path: root/cmd/podman/auto-update.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-07-15 11:27:25 +0200
committerValentin Rothberg <rothberg@redhat.com>2021-07-15 11:39:50 +0200
commit59f31d86acdf54019b081ca86340d5c33dbcf3b9 (patch)
tree3b243e70c88bb03880d6f1fc459d5f1d57e07cce /cmd/podman/auto-update.go
parent1568247ec8fa0c1a23bbd4631c1ea2fcfd85e281 (diff)
downloadpodman-59f31d86acdf54019b081ca86340d5c33dbcf3b9.tar.gz
podman-59f31d86acdf54019b081ca86340d5c33dbcf3b9.tar.bz2
podman-59f31d86acdf54019b081ca86340d5c33dbcf3b9.zip
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 <rothberg@redhat.com>
Diffstat (limited to 'cmd/podman/auto-update.go')
-rw-r--r--cmd/podman/auto-update.go2
1 files changed, 2 insertions, 0 deletions
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{}))
}