summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-09-09 15:44:54 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-09-10 10:03:06 -0400
commitdfd10d2bcd1104e08609c379c89dffdc3bf8f09b (patch)
tree641f5277f665023b590e008b1799e0de1591cf2a /cmd
parente1b47296daaf4148d9970b59757a86e71bf8bb10 (diff)
downloadpodman-dfd10d2bcd1104e08609c379c89dffdc3bf8f09b.tar.gz
podman-dfd10d2bcd1104e08609c379c89dffdc3bf8f09b.tar.bz2
podman-dfd10d2bcd1104e08609c379c89dffdc3bf8f09b.zip
podman container runlabel should pull the image if it does not exist
Since --pull is deprecated, remove it from help and hide if from --help Also set it to true by default. Share image pull code betweern podman image pull and podman container runlabel. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1877181 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/containers/runlabel.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/podman/containers/runlabel.go b/cmd/podman/containers/runlabel.go
index 81eec2a42..5ee8c9d6c 100644
--- a/cmd/podman/containers/runlabel.go
+++ b/cmd/podman/containers/runlabel.go
@@ -30,7 +30,7 @@ var (
RunE: runlabel,
Args: cobra.MinimumNArgs(2),
Example: `podman container runlabel run imageID
- podman container runlabel --pull install imageID arg1 arg2
+ podman container runlabel install imageID arg1 arg2
podman container runlabel --display run myImage`,
}
)
@@ -51,7 +51,7 @@ func init() {
flags.StringVar(&runlabelOptions.Optional1, "opt1", "", "Optional parameter to pass for install")
flags.StringVar(&runlabelOptions.Optional2, "opt2", "", "Optional parameter to pass for install")
flags.StringVar(&runlabelOptions.Optional3, "opt3", "", "Optional parameter to pass for install")
- flags.BoolP("pull", "p", false, "Pull the image if it does not exist locally prior to executing the label contents")
+ flags.BoolVarP(&runlabelOptions.Pull, "pull", "p", true, "Pull the image if it does not exist locally prior to executing the label contents")
flags.BoolVarP(&runlabelOptions.Quiet, "quiet", "q", false, "Suppress output information when installing images")
flags.BoolVar(&runlabelOptions.Replace, "replace", false, "Replace existing container with a new one from the image")
flags.StringVar(&runlabelOptions.SignaturePolicy, "signature-policy", "", "`Pathname` of signature policy file (not usually used)")
@@ -61,6 +61,7 @@ func init() {
_ = flags.MarkHidden("opt1")
_ = flags.MarkHidden("opt2")
_ = flags.MarkHidden("opt3")
+ _ = flags.MarkHidden("pull")
_ = flags.MarkHidden("signature-policy")
if err := flags.MarkDeprecated("pull", "podman will pull if not found in local storage"); err != nil {