aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2019-11-06 17:35:26 -0500
committerNalin Dahyabhai <nalin@redhat.com>2019-11-06 17:36:04 -0500
commit5e3e41daee4f51a425b251bf3b2339fbf0628a8e (patch)
tree0823cb4f6296aeb6a924f5737953f6b893228a13 /cmd
parent2e2d82ce767895e80da0d6cf5e6d391901687deb (diff)
downloadpodman-5e3e41daee4f51a425b251bf3b2339fbf0628a8e.tar.gz
podman-5e3e41daee4f51a425b251bf3b2339fbf0628a8e.tar.bz2
podman-5e3e41daee4f51a425b251bf3b2339fbf0628a8e.zip
podman images --digest: always list a digest
When we're asked to display image digests, always provide them if we have values that we can provide. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/images.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/podman/images.go b/cmd/podman/images.go
index 6157fda2a..7d498517c 100644
--- a/cmd/podman/images.go
+++ b/cmd/podman/images.go
@@ -291,6 +291,10 @@ func getImagesTemplateOutput(ctx context.Context, images []*adapter.ContainerIma
if len(tag) == 71 && strings.HasPrefix(tag, "sha256:") {
imageDigest = digest.Digest(tag)
tag = ""
+ } else {
+ if img.Digest() != "" {
+ imageDigest = img.Digest()
+ }
}
params := imagesTemplateParams{
Repository: repo,