summaryrefslogtreecommitdiff
path: root/libpod/runtime_pod_infra_linux.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 /libpod/runtime_pod_infra_linux.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 'libpod/runtime_pod_infra_linux.go')
-rw-r--r--libpod/runtime_pod_infra_linux.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/runtime_pod_infra_linux.go b/libpod/runtime_pod_infra_linux.go
index da35b7f93..4b77721d0 100644
--- a/libpod/runtime_pod_infra_linux.go
+++ b/libpod/runtime_pod_infra_linux.go
@@ -9,6 +9,7 @@ import (
"github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/libpod/image"
"github.com/containers/libpod/pkg/rootless"
+ "github.com/containers/libpod/pkg/util"
"github.com/opencontainers/image-spec/specs-go/v1"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
@@ -108,7 +109,7 @@ func (r *Runtime) createInfraContainer(ctx context.Context, p *Pod) (*Container,
return nil, define.ErrRuntimeStopped
}
- newImage, err := r.ImageRuntime().New(ctx, r.config.InfraImage, "", "", nil, nil, image.SigningOptions{}, false, nil)
+ newImage, err := r.ImageRuntime().New(ctx, r.config.InfraImage, "", "", nil, nil, image.SigningOptions{}, nil, util.PullImageMissing)
if err != nil {
return nil, err
}