summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2022-01-09 10:28:21 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2022-01-10 16:13:33 -0500
commit19a475906612b603b11fbbf6ee6a6978a4bd9586 (patch)
tree6ae0507c33be21bcc265a547322f94fc4a00db7f /pkg
parent87cd4b698cea28ef99b3b3326309b068b9aa7f04 (diff)
downloadpodman-19a475906612b603b11fbbf6ee6a6978a4bd9586.tar.gz
podman-19a475906612b603b11fbbf6ee6a6978a4bd9586.tar.bz2
podman-19a475906612b603b11fbbf6ee6a6978a4bd9586.zip
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 <dwalsh@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/libpod/pods.go12
1 files changed, 2 insertions, 10 deletions
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)