diff options
author | Valentin Rothberg <rothberg@redhat.com> | 2020-10-21 15:25:17 +0200 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-10-21 16:51:09 +0200 |
commit | 410fa53f89b1c408ce57318bb054b4229ad845d5 (patch) | |
tree | 4cb1848771aeedd3b5c0d8d9b3711d9925d3c06f /libpod | |
parent | 9d9c58ba64a59fc24d6807f495559ac2ec86b6e8 (diff) | |
download | podman-410fa53f89b1c408ce57318bb054b4229ad845d5.tar.gz podman-410fa53f89b1c408ce57318bb054b4229ad845d5.tar.bz2 podman-410fa53f89b1c408ce57318bb054b4229ad845d5.zip |
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 <rothberg@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/image/image.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |