summaryrefslogtreecommitdiff
path: root/cmd/podman/runlabel.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-03-01 08:57:01 -0600
committerbaude <bbaude@redhat.com>2019-03-01 09:20:12 -0600
commita4b82c03d3f70ac0df712ec9100a59662e86b625 (patch)
treec7bbfafb5618a692175d6958a14761a776c95629 /cmd/podman/runlabel.go
parentc80416f0346200c7906cfc16c6101594653a0ad6 (diff)
downloadpodman-a4b82c03d3f70ac0df712ec9100a59662e86b625.tar.gz
podman-a4b82c03d3f70ac0df712ec9100a59662e86b625.tar.bz2
podman-a4b82c03d3f70ac0df712ec9100a59662e86b625.zip
Pull image for runlabel if not local
In cases where a user issues the podman container runlabel command and the image is not local, we now default to pulling the image automatically to mimic the atomic cli behavior. Fixes: BZ #1677905 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/runlabel.go')
-rw-r--r--cmd/podman/runlabel.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/podman/runlabel.go b/cmd/podman/runlabel.go
index bc4e650f9..f91ffed0d 100644
--- a/cmd/podman/runlabel.go
+++ b/cmd/podman/runlabel.go
@@ -53,10 +53,12 @@ func init() {
flags.MarkHidden("opt2")
flags.MarkHidden("opt3")
- flags.BoolVarP(&runlabelCommand.Pull, "pull", "p", false, "Pull the image if it does not exist locally prior to executing the label contents")
+ flags.BoolP("pull", "p", false, "Pull the image if it does not exist locally prior to executing the label contents")
flags.BoolVarP(&runlabelCommand.Quiet, "quiet", "q", false, "Suppress output information when installing images")
flags.StringVar(&runlabelCommand.SignaturePolicy, "signature-policy", "", "`Pathname` of signature policy file (not usually used)")
flags.BoolVar(&runlabelCommand.TlsVerify, "tls-verify", true, "Require HTTPS and verify certificates when contacting registries (default: true)")
+
+ flags.MarkDeprecated("pull", "podman will pull if not found in local storage")
}
// installCmd gets the data from the command line and calls installImage
@@ -95,7 +97,6 @@ func runlabelCmd(c *cliconfig.RunlabelValues) error {
if len(args) > 2 {
extraArgs = args[2:]
}
- pull := c.Pull
label := args[0]
runlabelImage := args[1]
@@ -131,7 +132,7 @@ func runlabelCmd(c *cliconfig.RunlabelValues) error {
}
authfile := getAuthFile(c.Authfile)
- runLabel, imageName, err := shared.GetRunlabel(label, runlabelImage, ctx, runtime, pull, c.Creds, dockerRegistryOptions, authfile, c.SignaturePolicy, stdOut)
+ runLabel, imageName, err := shared.GetRunlabel(label, runlabelImage, ctx, runtime, true, c.Creds, dockerRegistryOptions, authfile, c.SignaturePolicy, stdOut)
if err != nil {
return err
}