diff options
author | Qi Wang <qiwan@redhat.com> | 2019-07-22 09:47:42 -0400 |
---|---|---|
committer | Qi Wang <qiwan@redhat.com> | 2019-08-09 15:21:34 -0400 |
commit | decfea65bed9e84373c8cdc538f79686c0ad40b9 (patch) | |
tree | fce60eb1ae070ef691432d63970ded2eabf8b67d /pkg/adapter/pods.go | |
parent | d05798e5e8efcb1acdd8794edfa0f82bf5f01045 (diff) | |
download | podman-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 'pkg/adapter/pods.go')
-rw-r--r-- | pkg/adapter/pods.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/adapter/pods.go b/pkg/adapter/pods.go index e25238956..66588ce26 100644 --- a/pkg/adapter/pods.go +++ b/pkg/adapter/pods.go @@ -19,6 +19,7 @@ import ( "github.com/containers/libpod/pkg/adapter/shortcuts" ns "github.com/containers/libpod/pkg/namespaces" createconfig "github.com/containers/libpod/pkg/spec" + "github.com/containers/libpod/pkg/util" "github.com/containers/storage" "github.com/cri-o/ocicni/pkg/ocicni" "github.com/ghodss/yaml" @@ -578,7 +579,7 @@ func (r *LocalRuntime) PlayKubeYAML(ctx context.Context, c *cliconfig.KubePlayVa } for _, container := range podYAML.Spec.Containers { - newImage, err := r.ImageRuntime().New(ctx, container.Image, c.SignaturePolicy, c.Authfile, writer, &dockerRegistryOptions, image.SigningOptions{}, false, nil) + newImage, err := r.ImageRuntime().New(ctx, container.Image, c.SignaturePolicy, c.Authfile, writer, &dockerRegistryOptions, image.SigningOptions{}, nil, util.PullImageMissing) if err != nil { return nil, err } |