diff options
author | W. Trevor King <wking@tremily.us> | 2019-01-31 10:57:49 -0800 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-02-08 15:02:28 -0500 |
commit | 53e70e268a849fcba2301f340544a57401337056 (patch) | |
tree | 3c4b5ce3cb2bcb3361945e45f0b0034a4b3dfe4d | |
parent | 431459caf946c1645da31b4fc6c953ad77f9bc85 (diff) | |
download | podman-53e70e268a849fcba2301f340544a57401337056.tar.gz podman-53e70e268a849fcba2301f340544a57401337056.tar.bz2 podman-53e70e268a849fcba2301f340544a57401337056.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.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go index 2e12adb70..8b650f25f 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -824,9 +824,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() |