diff options
author | W. Trevor King <wking@tremily.us> | 2019-01-31 10:57:49 -0800 |
---|---|---|
committer | W. Trevor King <wking@tremily.us> | 2019-01-31 11:01:19 -0800 |
commit | 40943586d2d56a746bf780b7529d13f59cbbb64b (patch) | |
tree | 09cd81173591f92ec8c9806c4549958bfb96e094 /libpod/image/image.go | |
parent | 805c6d997b4eb8941e7c2a12879bf9a5284835d0 (diff) | |
download | podman-40943586d2d56a746bf780b7529d13f59cbbb64b.tar.gz podman-40943586d2d56a746bf780b7529d13f59cbbb64b.tar.bz2 podman-40943586d2d56a746bf780b7529d13f59cbbb64b.zip |
libpod/image: Use RepoDigests() in Inspect()
To get the more-robust handling from 0f6535cf (libpod/image: Use
ParseNormalizedNamed in RepoDigests, 2019-01-08, #2106) here too.
Signed-off-by: W. Trevor King <wking@tremily.us>
Diffstat (limited to 'libpod/image/image.go')
-rw-r--r-- | libpod/image/image.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go index ea326d820..a32336f49 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -823,9 +823,9 @@ func (i *Image) Inspect(ctx context.Context) (*inspect.ImageData, error) { return nil, err } - var repoDigests []string - for _, name := range i.Names() { - repoDigests = append(repoDigests, strings.SplitN(name, ":", 2)[0]+"@"+i.Digest().String()) + repoDigests, err := i.RepoDigests() + if err != nil { + return nil, err } driver, err := i.DriverData() |