summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2019-01-31 10:57:49 -0800
committerW. Trevor King <wking@tremily.us>2019-01-31 11:01:19 -0800
commit40943586d2d56a746bf780b7529d13f59cbbb64b (patch)
tree09cd81173591f92ec8c9806c4549958bfb96e094
parent805c6d997b4eb8941e7c2a12879bf9a5284835d0 (diff)
downloadpodman-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>
-rw-r--r--libpod/image/image.go6
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()