Repository navigation
image/list: Hide untagged images without --all - #6574
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
| } | ||
| images := res.Items | ||
| if !options.all { | ||
| if _, ok := filters["dangling"]; ok { |
There was a problem hiding this comment.
Not 100% sure about this, but I think it makes sense to NOT manipulate the dangling images if --all wasn't passed but dangling filter was used explicitly
There was a problem hiding this comment.
Not at my computer to test, but this means that filtering for dangling images won't produce a result unless --all is also passed? Or is this just the optimization to not process them?
There was a problem hiding this comment.
Yes, without this change docker images --filter dangling=true would always result in empty image list.
The `--tree` implementation already does this. Make the behavior consistent for the legacy image list implementation. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Otherwise `docker images --filter dangling=true` won't work without `--all`. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
|
@vvoland apologies for necroing this MR but what is the rationale behind not showing untagged images by default? The current supply chain security standards pretty much recommend to always pull by digest so essentially all our deployments use untagged images. Imagine my surprise when I am running 30 containers in a VM and Is it for practical reasons like rebuilding the same tag on local machines and hiding untagged images? |
|
@cen1 - digested images should still be shown by default.
Are you on the legacy graphdriver legacy store? |
|
You're right though that there is no clear definition on what a dangling/untagged image is.. I opened moby/moby#53941 as a starting point of the discussion |
|
Indeed, I was on legacy store unknowingly. Seems to work as expected on default, thx for the tip. |

The
--treeimplementation already does this.Make the behavior consistent for the legacy image list implementation.
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)