Skip to content

Show images digests when "{{.Digest}}" is in format#439

Merged
vdemeester merged 1 commit intodocker:masterfrom
boaz0:fix_image_ls_digest
Aug 22, 2017
Merged

Show images digests when "{{.Digest}}" is in format#439
vdemeester merged 1 commit intodocker:masterfrom
boaz0:fix_image_ls_digest

Conversation

@boaz0
Copy link
Copy Markdown
Contributor

@boaz0 boaz0 commented Aug 14, 2017

- What I did

This patch fixes the following bug #435:

Running "docker image ls --digests" will add images digests
to the image table. However, when using "format" to display
images digests all of them are "".

- How I did it

In cli/command/formatter/image.go if either --digests is true or {{.Digest}} is in --format then display the image digest. Otherwise, set it to nil.

- How to verify it

Run unit-tests

- Description for the changelog
Fix #435

- A picture of a cute animal (not mandatory but encouraged)

Copy link
Copy Markdown
Contributor

@dnephin dnephin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@boaz0
Copy link
Copy Markdown
Contributor Author

boaz0 commented Aug 14, 2017

Have no idea why test keeps failing. 🤔🐺❓

@dnephin
Copy link
Copy Markdown
Contributor

dnephin commented Aug 14, 2017

It's failing to upload code coverage to codedov service. It might be down. It's not related to your change.

This patch fixes the following bug:

Running "docker image ls --digests" will add images digests
to the image table. However, when using "format" to display
images digests all of them are "<none>".

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 22, 2017

Codecov Report

Merging #439 into master will decrease coverage by 0.73%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #439      +/-   ##
==========================================
- Coverage   47.01%   46.28%   -0.74%     
==========================================
  Files         198      194       -4     
  Lines       16334    16136     -198     
==========================================
- Hits         7680     7468     -212     
- Misses       8260     8279      +19     
+ Partials      394      389       -5

Copy link
Copy Markdown
Collaborator

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🦁

@vdemeester vdemeester merged commit 317b735 into docker:master Aug 22, 2017
@GordonTheTurtle GordonTheTurtle added this to the 17.08.0 milestone Aug 22, 2017
nobiit pushed a commit to nobidev/docker-cli that referenced this pull request Nov 19, 2025
[18.03] Fix TestAttachAfterDetach to work with latest client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker image ls --format '{{ .Digest }}' unexpectedly returns none

5 participants