summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-12-07 11:58:10 +0100
committerValentin Rothberg <rothberg@redhat.com>2020-12-07 11:58:10 +0100
commitf294d89b5cae01f334e1798820f0de97c171d2df (patch)
tree129be5158e65ffa10d2cb7ffc6f9819f38655c6d /pkg/specgen/generate
parent035d2891b79d9e44aca81ee449bbe7dc7d6ebe37 (diff)
downloadpodman-f294d89b5cae01f334e1798820f0de97c171d2df.tar.gz
podman-f294d89b5cae01f334e1798820f0de97c171d2df.tar.bz2
podman-f294d89b5cae01f334e1798820f0de97c171d2df.zip
container create: do not clear image name
When creating a container, do not clear the input-image name before looking up image names. Also add a regression test. Fixes: #8558 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/specgen/generate')
-rw-r--r--pkg/specgen/generate/container_create.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go
index 95e4eeb8f..4f36744ca 100644
--- a/pkg/specgen/generate/container_create.go
+++ b/pkg/specgen/generate/container_create.go
@@ -98,7 +98,6 @@ func MakeContainer(ctx context.Context, rt *libpod.Runtime, s *specgen.SpecGener
// present.
imgName := newImage.InputName
if s.Image == newImage.InputName && strings.HasPrefix(newImage.ID(), s.Image) {
- imgName = ""
names := newImage.Names()
if len(names) > 0 {
imgName = names[0]