summaryrefslogtreecommitdiff
path: root/libpod/image
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2019-10-16 12:00:12 -0400
committerNalin Dahyabhai <nalin@redhat.com>2019-10-29 13:35:19 -0400
commit07195ff09fdcb0d2d3a044c92665b082d6e742b1 (patch)
treef69d2b1d0f904706e260962ca64674a231a0d071 /libpod/image
parentb9313d355e8cd6307d8772ad9c21958ffe981e5b (diff)
downloadpodman-07195ff09fdcb0d2d3a044c92665b082d6e742b1.tar.gz
podman-07195ff09fdcb0d2d3a044c92665b082d6e742b1.tar.bz2
podman-07195ff09fdcb0d2d3a044c92665b082d6e742b1.zip
API: report multiple digests for images
Be prepared to report multiple image digests for images which contain multiple manifests but, because they continue to have the same set of layers and the same configuration, are considered to be the same image. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'libpod/image')
-rw-r--r--libpod/image/image.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go
index 2ab88f2e9..faa3b648a 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -299,6 +299,11 @@ func (i *Image) Digest() digest.Digest {
return i.image.Digest
}
+// Digests returns the image's digests
+func (i *Image) Digests() []digest.Digest {
+ return i.image.Digests
+}
+
// GetManifest returns the image's manifest as a byte array
// and manifest type as a string.
func (i *Image) GetManifest(ctx context.Context, instanceDigest *digest.Digest) ([]byte, string, error) {