From 410fa53f89b1c408ce57318bb054b4229ad845d5 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 21 Oct 2020 15:25:17 +0200 Subject: container create: record correct image name Record the correct image name when creating a container by using the resolved image name if present. Otherwise, default to using the first available name or an empty string in which case the image must have been referenced by ID. Fixes: #8082 Signed-off-by: Valentin Rothberg --- libpod/image/image.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libpod') diff --git a/libpod/image/image.go b/libpod/image/image.go index 0900944eb..85f8bf37c 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -469,7 +469,7 @@ func (ir *Runtime) getLocalImage(inputName string) (string, *storage.Image, erro if err != nil { return "", nil, err } - img, err := ir.store.Image(ref.String()) + img, err := ir.store.Image(reference.TagNameOnly(ref).String()) if err == nil { return ref.String(), img, nil } -- cgit v1.2.3-54-g00ecf