From b66b93130cc43670efcb58e7f38809ebbfcae20d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Thu, 13 Nov 2025 12:46:05 +0100 Subject: [PATCH] image/tree: Fix untagged images in non-expanded view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the expanded view there is a separate image entry per each tag. Fix a bug which caused no entry to be added for untagged images. Signed-off-by: Paweł Gronowski --- cli/command/image/tree.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cli/command/image/tree.go b/cli/command/image/tree.go index 4d032922a..040ce9499 100644 --- a/cli/command/image/tree.go +++ b/cli/command/image/tree.go @@ -111,6 +111,13 @@ func runTree(ctx context.Context, dockerCLI command.Cli, opts treeOptions) (int, continue } + if len(sortedTags) == 0 { + view.images = append(view.images, topImage{ + Details: topDetails, + Children: children, + created: img.Created, + }) + } for _, tag := range sortedTags { view.images = append(view.images, topImage{ Names: []string{tag},