From 19a475906612b603b11fbbf6ee6a6978a4bd9586 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sun, 9 Jan 2022 10:28:21 -0500 Subject: Use the InfraImage defined in containers.conf Remove hard code use of the DefaultInfraImage and rely on getting this from containers.conf. Fixes: https://github.com/containers/podman/issues/12771 Signed-off-by: Daniel J Walsh --- pkg/api/handlers/libpod/pods.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'pkg') diff --git a/pkg/api/handlers/libpod/pods.go b/pkg/api/handlers/libpod/pods.go index 1b29831b4..43b39060b 100644 --- a/pkg/api/handlers/libpod/pods.go +++ b/pkg/api/handlers/libpod/pods.go @@ -7,7 +7,6 @@ import ( "strings" "time" - "github.com/containers/common/pkg/config" "github.com/containers/podman/v3/libpod" "github.com/containers/podman/v3/libpod/define" "github.com/containers/podman/v3/pkg/api/handlers" @@ -62,15 +61,8 @@ func PodCreate(w http.ResponseWriter, r *http.Request) { psg.InfraContainerSpec.Name = psg.InfraName psg.InfraContainerSpec.ConmonPidFile = psg.InfraConmonPidFile psg.InfraContainerSpec.ContainerCreateCommand = psg.InfraCommand - imageName := psg.InfraImage - rawImageName := psg.InfraImage - if imageName == "" { - imageName = config.DefaultInfraImage - rawImageName = config.DefaultInfraImage - } - psg.InfraImage = imageName - psg.InfraContainerSpec.Image = imageName - psg.InfraContainerSpec.RawImageName = rawImageName + psg.InfraContainerSpec.Image = psg.InfraImage + psg.InfraContainerSpec.RawImageName = psg.InfraImage } podSpecComplete := entities.PodSpec{PodSpecGen: psg} pod, err := generate.MakePod(&podSpecComplete, runtime) -- cgit v1.2.3-54-g00ecf