summaryrefslogtreecommitdiff
path: root/cmd/podman
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 /cmd/podman
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 'cmd/podman')
-rw-r--r--cmd/podman/images.go16
-rw-r--r--cmd/podman/varlink/io.podman.varlink3
2 files changed, 12 insertions, 7 deletions
diff --git a/cmd/podman/images.go b/cmd/podman/images.go
index e363fa3bb..6bb08e195 100644
--- a/cmd/podman/images.go
+++ b/cmd/podman/images.go
@@ -27,6 +27,7 @@ type imagesTemplateParams struct {
Tag string
ID string
Digest digest.Digest
+ Digests []digest.Digest
Created string
CreatedTime time.Time
Size string
@@ -34,12 +35,13 @@ type imagesTemplateParams struct {
}
type imagesJSONParams struct {
- ID string `json:"id"`
- Name []string `json:"names"`
- Digest digest.Digest `json:"digest"`
- Created time.Time `json:"created"`
- Size *uint64 `json:"size"`
- ReadOnly bool `json:"readonly"`
+ ID string `json:"id"`
+ Name []string `json:"names"`
+ Digest digest.Digest `json:"digest"`
+ Digests []digest.Digest `json:"digests"`
+ Created time.Time `json:"created"`
+ Size *uint64 `json:"size"`
+ ReadOnly bool `json:"readonly"`
}
type imagesOptions struct {
@@ -290,6 +292,7 @@ func getImagesTemplateOutput(ctx context.Context, images []*adapter.ContainerIma
Tag: tag,
ID: imageID,
Digest: img.Digest(),
+ Digests: img.Digests(),
CreatedTime: createdTime,
Created: units.HumanDuration(time.Since(createdTime)) + " ago",
Size: sizeStr,
@@ -321,6 +324,7 @@ func getImagesJSONOutput(ctx context.Context, images []*adapter.ContainerImage)
ID: img.ID(),
Name: img.Names(),
Digest: img.Digest(),
+ Digests: img.Digests(),
Created: img.Created(),
Size: size,
ReadOnly: img.IsReadOnly(),
diff --git a/cmd/podman/varlink/io.podman.varlink b/cmd/podman/varlink/io.podman.varlink
index 9ec7d1172..f9339fccb 100644
--- a/cmd/podman/varlink/io.podman.varlink
+++ b/cmd/podman/varlink/io.podman.varlink
@@ -58,7 +58,8 @@ type VolumeRemoveOpts (
type Image (
id: string,
- digest: string,
+ digest: string,
+ digests: []string,
parentId: string,
repoTags: []string,
repoDigests: []string,