Skip to content

image/list: Show collapsed tree by default - #6566

Merged
thaJeztah merged 5 commits into
docker:masterfrom
vvoland:img-list
Oct 31, 2025
Merged

image/list: Show collapsed tree by default#6566
thaJeztah merged 5 commits into
docker:masterfrom
vvoland:img-list

Conversation

@vvoland

@vvolandvvoland commented Oct 15, 2025

Copy link
Copy Markdown
Collaborator

Use the new tree view by default and only fallback if format or old view-related options are used.

The expanded view is shown when --tree is passed.

- Human readable description for the release notes

`docker image ls` now uses the new view (like `--tree` but collapsed) by default.

With containerd

image

With graphdrivers

image

@vvolandvvoland added this to the 29.0.0 milestone Oct 15, 2025
@vvolandvvoland self-assigned this Oct 15, 2025
@vvolandvvoland added kind/feature area/ux containerd-integration Issues and PRs related to containerd integration impact/changelog labels Oct 15, 2025
@vvoland

Copy link
Copy Markdown
CollaboratorAuthor

With graphdrivers we'll always get the CONTENT SIZE full of 0...

Should we get #5771 in?

@codecov-commenter

codecov-commenter commented Oct 15, 2025

Copy link
Copy Markdown

Codecov Report

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

Files with missing linesPatch %Lines
cli/command/image/tree.go13.79%25 Missing ⚠️
cli/command/image/list.go54.05%12 Missing and 5 partials ⚠️

📢 Thoughts on this report? Let us know!

@vvoland
vvolandforce-pushed the img-list branch 2 times, most recently from 25d0a78 to 735d8abCompareOctober 15, 2025 14:08
@vvoland

Copy link
Copy Markdown
CollaboratorAuthor

Multiple tags pointing to the same image:
image

Should we duplicate the info for each of them?

@thaJeztah

Copy link
Copy Markdown
Member

@thaJeztah

Copy link
Copy Markdown
Member

Did a quick rebase; so yeah, sorting per-image is something to look at;

Screenshot 2025-10-31 at 16 58 17

Also I noticed we show <untagged> - I thought we put that behind --all-tags or was that only for the "classic" view? 🤔

Screenshot 2025-10-31 at 16 59 06

@thaJeztah

Copy link
Copy Markdown
Member

Also I noticed we show - I thought we put that behind --all-tags or was that only for the "classic" view? 🤔

Nevermind; found your other PR 🤗

@vvoland

Copy link
Copy Markdown
CollaboratorAuthor

Should be good now:
image

@vvoland

Copy link
Copy Markdown
CollaboratorAuthor

Hmmm, except the content size looks wrong

Use the new tree view by default and only fallback if format or old
view-related options are used.
The expanded view is shown when `--tree` is passed.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
By default cobra inherit the `os.Args` if there's no non-nil Args slice
set.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland

Copy link
Copy Markdown
CollaboratorAuthor

Oh, I borked it during rebase, it's good now:
image

@thaJeztahthaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

much better

LGTM

@thaJeztah
thaJeztah merged commit 73aade1 into docker:masterOct 31, 2025
98 of 99 checks passed
@jarbelix

Copy link
Copy Markdown

In the official documentation (https://docs.docker.com/reference/cli/docker/image/ls/), if I want to list the most recent images I should do:

$ docker images

But after Docker version 29.0.0, I get something quite different from the documentation, as shown below:

To get the expected result I need to do:
docker-images

$ docker image list --format "table {{.Repository}}\t{{.Tag}}\t{{.ID}}\t{{.CreatedSince}}\t{{.Size}}"
docker-images-format

This behavior is only happening to me.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/uxcontainerd-integrationIssues and PRs related to containerd integrationimpact/changelogkind/feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@vvoland@codecov-commenter@thaJeztah@jarbelix