summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-28 14:36:43 +0000
committerGitHub <noreply@github.com>2020-09-28 14:36:43 +0000
commitd2802636b0a7e3d281e52b44676de5e3226fbabf (patch)
tree0bff853639fdce694a15879793b4ea89caa993b5 /cmd
parent97841e55072ae71713922ab6c6c1269e74b08dcf (diff)
parent1b5853e64794403d80c4d339c97b61dd63dd093a (diff)
downloadpodman-d2802636b0a7e3d281e52b44676de5e3226fbabf.tar.gz
podman-d2802636b0a7e3d281e52b44676de5e3226fbabf.tar.bz2
podman-d2802636b0a7e3d281e52b44676de5e3226fbabf.zip
Merge pull request #7770 from rhatdan/pullpolicy
Properly handle podman run --pull command
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/common/create.go2
-rw-r--r--cmd/podman/containers/create.go1
2 files changed, 2 insertions, 1 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index 7e3dc7fb4..bb4726817 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -363,7 +363,7 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet {
)
createFlags.StringVar(
&cf.Pull,
- "pull", "missing",
+ "pull", containerConfig.Engine.PullPolicy,
`Pull image before creating ("always"|"missing"|"never")`,
)
createFlags.BoolVarP(
diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go
index 96d94dc00..d75352848 100644
--- a/cmd/podman/containers/create.go
+++ b/cmd/podman/containers/create.go
@@ -261,6 +261,7 @@ func pullImage(imageName string) (string, error) {
OverrideOS: cliVals.OverrideOS,
OverrideVariant: cliVals.OverrideVariant,
SignaturePolicy: cliVals.SignaturePolicy,
+ PullPolicy: pullPolicy,
})
if pullErr != nil {
return "", pullErr