From 207bf52c27935b774301d7c3f820f0549f28893e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Thu, 13 Nov 2025 20:23:42 +0100 Subject: [PATCH] image/tree: Only show untagged images when --all flag is used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In non-expanded view, untagged images should only be displayed when the --all flag is explicitly provided by the user. Previously, untagged images were accidentally always shown in the non-expanded view regardless of the --all flag setting. Signed-off-by: Paweł Gronowski --- cli/command/image/tree.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/command/image/tree.go b/cli/command/image/tree.go index d856f69f9..db93bff0f 100644 --- a/cli/command/image/tree.go +++ b/cli/command/image/tree.go @@ -111,7 +111,7 @@ func runTree(ctx context.Context, dockerCLI command.Cli, opts treeOptions) (int, continue } - if len(sortedTags) == 0 { + if opts.all && len(sortedTags) == 0 { view.images = append(view.images, topImage{ Details: topDetails, Children: children,