summaryrefslogtreecommitdiff
path: root/cmd/podman/shared/container.go
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2019-07-22 09:47:42 -0400
committerQi Wang <qiwan@redhat.com>2019-08-09 15:21:34 -0400
commitdecfea65bed9e84373c8cdc538f79686c0ad40b9 (patch)
treefce60eb1ae070ef691432d63970ded2eabf8b67d /cmd/podman/shared/container.go
parentd05798e5e8efcb1acdd8794edfa0f82bf5f01045 (diff)
downloadpodman-decfea65bed9e84373c8cdc538f79686c0ad40b9.tar.gz
podman-decfea65bed9e84373c8cdc538f79686c0ad40b9.tar.bz2
podman-decfea65bed9e84373c8cdc538f79686c0ad40b9.zip
add --pull flag for podman create&run
Requirement from https://github.com/containers/libpod/issues/3575#issuecomment-512238393 Added --pull for podman create and pull to match the newly added flag in docker CLI. `missing`: default value, podman will pull the image if it does not exist in the local. `always`: podman will always pull the image. `never`: podman will never pull the image. Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'cmd/podman/shared/container.go')
-rw-r--r--cmd/podman/shared/container.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/shared/container.go b/cmd/podman/shared/container.go
index 7f53f5ec9..dc372d79c 100644
--- a/cmd/podman/shared/container.go
+++ b/cmd/podman/shared/container.go
@@ -732,7 +732,7 @@ func GetRunlabel(label string, runlabelImage string, ctx context.Context, runtim
registryCreds = creds
}
dockerRegistryOptions.DockerRegistryCreds = registryCreds
- newImage, err = runtime.ImageRuntime().New(ctx, runlabelImage, signaturePolicyPath, authfile, output, &dockerRegistryOptions, image.SigningOptions{}, false, &label)
+ newImage, err = runtime.ImageRuntime().New(ctx, runlabelImage, signaturePolicyPath, authfile, output, &dockerRegistryOptions, image.SigningOptions{}, &label, util.PullImageMissing)
} else {
newImage, err = runtime.ImageRuntime().NewFromLocal(runlabelImage)
}