image: Fix dangling image detection with graphdrivers by vvoland · Pull Request #6704 · docker/cli (original) (raw)

added 5 commits

December 12, 2025 11:16

@vvoland

The isDangling function was incorrectly identifying images as dangling when they had no RepoTags but had valid RepoDigests.

This can occur when the graphdrivers are used instead of the containerd image store.

An image should only be considered dangling if it has no RepoTags, regardless of whether it has RepoDigests.

Signed-off-by: Paweł Gronowski pawel.gronowski@docker.com

@vvoland

Signed-off-by: Paweł Gronowski pawel.gronowski@docker.com

@vvoland

When calculating column widths for the tree view, untagged images weren't being properly accounted for in the width calculation.

This caused layout issues when there were tagged images were shorter than the <untagged> string.

Signed-off-by: Paweł Gronowski pawel.gronowski@docker.com

@vvoland

…ed view

This reverts part of the logic introduced in 207bf52 which incorrectly gated untagged images behind the --all flag in non-expanded view.

The original fix was addressing the wrong layer of the problem.

The actual issue was that dangling images were being incorrectly passed to the tree code in the first place.

This was properly fixed in 67f5e34 which corrected the dangling image detection logic to properly filter them out before reaching the tree display code.

Now that dangling images are correctly filtered upstream, untagged images that reach the tree view should be displayed regardless of the --all flag setting.

Signed-off-by: Paweł Gronowski pawel.gronowski@docker.com

@vvoland

Signed-off-by: Paweł Gronowski pawel.gronowski@docker.com

thaJeztah

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})