Skip to content

Conversation

@vvoland
Copy link
Collaborator

@vvoland vvoland commented Oct 24, 2025

The --tree implementation already does this.

Make the behavior consistent for the legacy image list implementation.

- Human readable description for the release notes

`docker images` no longer shows untagged images by default if no `--all` flag is provided.

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

@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2025

Codecov Report

❌ Patch coverage is 36.36364% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/command/image/list.go 47.05% 6 Missing and 3 partials ⚠️
cli/command/image/tree.go 0.00% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

}
images := res.Items
if !options.all {
if _, ok := filters["dangling"]; ok {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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 <[email protected]>
Otherwise `docker images --filter dangling=true` won't work without
`--all`.

Signed-off-by: Paweł Gronowski <[email protected]>
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.

3 participants