Skip to content

image/list: Add opt-in to --tree by default - #5772

Closed
vvoland wants to merge 1 commit into
docker:masterfrom
vvoland:image-tree-optin
Closed

image/list: Add opt-in to --tree by default#5772
vvoland wants to merge 1 commit into
docker:masterfrom
vvoland:image-tree-optin

Conversation

@vvoland

Copy link
Copy Markdown
Collaborator

Add a new image-tree feature in ~/.docker/config.json which will make the docker image list use the new tree output by default.
The tree output is only used if no conflicting flag is passed (--format, --quiet, --digests, --no-trunc).

- Description for the changelog

`~/.docker/config.json` now supports an `image-tree` feature that will enable the new `image list` output by default whenever possible

Add a new `image-tree` feature in `~/.docker/config.json` which will
make the `docker image list` use the new tree output by default.
The tree output is only used if no conflicting flag is passed (--format,
--quiet, --digests, --no-trunc).
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@codecov-commenter

codecov-commenter commented Jan 24, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 28.57143% with 15 lines in your changes missing coverage. Please review.

Files with missing linesPatch %Lines
cli/command/image/list.go28.57%13 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@vvoland
vvoland requested a review from a teamJanuary 27, 2025 11:32
@thaJeztah

Copy link
Copy Markdown
Member

Hm, so my thinking with "enable by default" was to make the default a collapsed view of the tree-view, so that the columns stay the same (which is currently confusing, because without --tree you get different columns than with --tree); In that case, it would look something like this;

docker image ls
IMAGE ID DISK USAGE CONTENT SIZE IN USE
docker-cli-dev:latest 743475d9ae54 817MB 192MB ✔
myimage:latest d4ac66306dd9 16.5MB 7.64MB
docker-dev:latest fb53cf31af0f 2.23GB 580MB ✔
rpmbuild-fedora-41/arm64:latest 347239e5d412 1.53GB 356MB
debbuild-ubuntu-noble/arm64:latest 07141bca479f 1.45GB 360MB
debbuild-debian-bookworm/arm64:latest 1c00b1e78af9 1.74GB 461MB
docker:cli 1624879c3635 260MB 66MB
docker image ls --tree
IMAGE ID DISK USAGE CONTENT SIZE IN USE
docker-cli-dev:latest 743475d9ae54 817MB 192MB ✔
└─ linux/arm64 9431815c64e4 817MB 192MB ✔
myimage:latest d4ac66306dd9 16.5MB 7.64MB
├─ linux/arm64 ec5b4b1cef2d 12.8MB 3.99MB
└─ linux/amd64 2bf9e92542e1 3.65MB 3.65MB
docker-dev:latest fb53cf31af0f 2.23GB 580MB ✔
└─ linux/arm64 12a7c17e1b73 2.23GB 580MB ✔
rpmbuild-fedora-41/arm64:latest 347239e5d412 1.53GB 356MB
└─ linux/arm64 dd5275126098 1.53GB 356MB
debbuild-ubuntu-noble/arm64:latest 07141bca479f 1.45GB 360MB
└─ linux/arm64 032fb99f79b8 1.45GB 360MB
debbuild-debian-bookworm/arm64:latest 1c00b1e78af9 1.74GB 461MB
└─ linux/arm64 2b5c05517def 1.74GB 461MB
docker:cli 1624879c3635 260MB 66MB
├─ linux/amd64 e1b7fa9b2d15 0B 0B
├─ linux/arm/v6 67daf59d1ebd 0B 0B
├─ linux/arm/v7 ed7d82f74a17 0B 0B
└─ linux/arm64/v8 311320051fb1 260MB 66MB

@thaJeztah

thaJeztah commented Jan 27, 2025

Copy link
Copy Markdown
Member

☝️ However, that's where the discussion about these two PRs comes at hand;

@vvoland

Copy link
Copy Markdown
CollaboratorAuthor

Hmm right, I'll put it as draft for now.

@vvoland
vvoland marked this pull request as draft January 29, 2025 13:28
@vvolandvvoland closed this Feb 5, 2025
@vvolandvvoland reopened this Feb 5, 2025
@thaJeztahthaJeztah modified the milestones: 28.0.0, 28.0.5Mar 31, 2025
@thaJeztahthaJeztah modified the milestones: 28.1.1, 28.1.2Apr 23, 2025
@thaJeztahthaJeztah modified the milestones: 28.1.2, 28.2.0, 29.0.0May 15, 2025
@thaJeztahthaJeztah modified the milestones: 29.0.0, 29.2.0Jan 13, 2026
@thaJeztahthaJeztah modified the milestones: 29.2.0, 29.3.0Jan 26, 2026
@thaJeztahthaJeztah removed this from the 29.3.0 milestone Mar 4, 2026
@thaJeztahthaJeztah added this to the 29.3.1 milestone Mar 4, 2026
@thaJeztahthaJeztah modified the milestones: 29.4.0, 29.4.1Apr 3, 2026
@vvolandvvoland closed this Apr 16, 2026
Sign up for freeto 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.

4 participants

@vvoland@codecov-commenter@thaJeztah@Benehiko