diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2019-11-06 17:35:26 -0500 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2019-11-06 17:36:04 -0500 |
commit | 5e3e41daee4f51a425b251bf3b2339fbf0628a8e (patch) | |
tree | 0823cb4f6296aeb6a924f5737953f6b893228a13 | |
parent | 2e2d82ce767895e80da0d6cf5e6d391901687deb (diff) | |
download | podman-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>
-rw-r--r-- | cmd/podman/images.go | 4 |
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, |