diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-12-07 11:58:10 +0100 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2020-12-07 14:40:47 -0500 |
commit | 2ddb16d4c8ace2da51f4abd94efd463c637e8808 (patch) | |
tree | 91344faa11fa2c819eb4504e6077a12c62f298ab /pkg | |
parent | 9b4266eb942b10926ea69ba13d84d5e36a61bd3c (diff) | |
download | podman-2ddb16d4c8ace2da51f4abd94efd463c637e8808.tar.gz podman-2ddb16d4c8ace2da51f4abd94efd463c637e8808.tar.bz2 podman-2ddb16d4c8ace2da51f4abd94efd463c637e8808.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>
<MH: Fixed cherry-pick conflicts>
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/specgen/generate/container_create.go | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/pkg/specgen/generate/container_create.go b/pkg/specgen/generate/container_create.go index 45a374216..6a77d0807 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] |