diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-16 09:22:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-16 09:22:27 -0500 |
commit | 3eb2ce34dc4392e1b758732201d5a6dd5033584c (patch) | |
tree | 36cd03b207b9332b0170f12b6d9d0de7dec10fae /pkg | |
parent | 6639b218a28301e6e8d075cceb18c56ea62fcade (diff) | |
parent | 2a21ecafa74e6ef7d982ca3ec8ed689abcbec672 (diff) | |
download | podman-3eb2ce34dc4392e1b758732201d5a6dd5033584c.tar.gz podman-3eb2ce34dc4392e1b758732201d5a6dd5033584c.tar.bz2 podman-3eb2ce34dc4392e1b758732201d5a6dd5033584c.zip |
Merge pull request #9397 from vrothberg/fix-9232
images/create: always pull image
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/api/handlers/compat/images.go | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/pkg/api/handlers/compat/images.go b/pkg/api/handlers/compat/images.go index 85708912b..0d75d1a94 100644 --- a/pkg/api/handlers/compat/images.go +++ b/pkg/api/handlers/compat/images.go @@ -10,7 +10,6 @@ import ( "strings" "github.com/containers/buildah" - "github.com/containers/common/pkg/config" "github.com/containers/image/v5/manifest" "github.com/containers/podman/v2/libpod" image2 "github.com/containers/podman/v2/libpod/image" @@ -18,6 +17,7 @@ import ( "github.com/containers/podman/v2/pkg/api/handlers/utils" "github.com/containers/podman/v2/pkg/auth" "github.com/containers/podman/v2/pkg/domain/entities" + "github.com/containers/podman/v2/pkg/util" "github.com/gorilla/schema" "github.com/opencontainers/go-digest" "github.com/pkg/errors" @@ -236,16 +236,6 @@ func CreateImageFromImage(w http.ResponseWriter, r *http.Request) { if sys := runtime.SystemContext(); sys != nil { registryOpts.DockerCertPath = sys.DockerCertPath } - rtc, err := runtime.GetConfig() - if err != nil { - utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "Decode()")) - return - } - pullPolicy, err := config.ValidatePullPolicy(rtc.Engine.PullPolicy) - if err != nil { - utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "Decode()")) - return - } img, err := runtime.ImageRuntime().New(r.Context(), fromImage, "", // signature policy @@ -254,7 +244,7 @@ func CreateImageFromImage(w http.ResponseWriter, r *http.Request) { ®istryOpts, image2.SigningOptions{}, nil, // label - pullPolicy, + util.PullImageAlways, ) if err != nil { utils.Error(w, "Something went wrong.", http.StatusInternalServerError, err) |