diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-10-27 10:22:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 10:22:56 +0000 |
commit | 979b6312286b4bd993d7be0413e1e95c4a0bad56 (patch) | |
tree | 0da95f96aa774c035e97d5080f91a563c1f0ec1a /pkg/api/handlers/libpod | |
parent | 9fbf2a40f19e1aea97e46e6e7c7992996f8ca827 (diff) | |
parent | 75f478c08b82a9d6a99628bee5698a85610f863c (diff) | |
download | podman-979b6312286b4bd993d7be0413e1e95c4a0bad56.tar.gz podman-979b6312286b4bd993d7be0413e1e95c4a0bad56.tar.bz2 podman-979b6312286b4bd993d7be0413e1e95c4a0bad56.zip |
Merge pull request #11956 from vrothberg/pause
remove need to download pause image
Diffstat (limited to 'pkg/api/handlers/libpod')
-rw-r--r-- | pkg/api/handlers/libpod/pods.go | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/pkg/api/handlers/libpod/pods.go b/pkg/api/handlers/libpod/pods.go index 77d026550..1e64de0ee 100644 --- a/pkg/api/handlers/libpod/pods.go +++ b/pkg/api/handlers/libpod/pods.go @@ -1,15 +1,12 @@ package libpod import ( - "context" "encoding/json" "fmt" "net/http" "strings" - "github.com/containers/common/libimage" "github.com/containers/common/pkg/config" - "github.com/containers/image/v5/transports/alltransports" "github.com/containers/podman/v3/libpod" "github.com/containers/podman/v3/libpod/define" "github.com/containers/podman/v3/pkg/api/handlers" @@ -67,20 +64,6 @@ func PodCreate(w http.ResponseWriter, r *http.Request) { imageName = config.DefaultInfraImage rawImageName = config.DefaultInfraImage } - curr := infraOptions.Quiet - infraOptions.Quiet = true - pullOptions := &libimage.PullOptions{} - pulledImages, err := runtime.LibimageRuntime().Pull(context.Background(), imageName, config.PullPolicyMissing, pullOptions) - if err != nil { - utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "could not pull image")) - return - } - if _, err := alltransports.ParseImageName(imageName); err == nil { - if len(pulledImages) != 0 { - imageName = pulledImages[0].ID() - } - } - infraOptions.Quiet = curr psg.InfraImage = imageName psg.InfraContainerSpec.Image = imageName psg.InfraContainerSpec.RawImageName = rawImageName |