Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vvoland
Copy link
Collaborator

@vvoland vvoland commented Jan 24, 2025

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 <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2025

Codecov Report

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

Project coverage is 59.40%. Comparing base (17c5fe6) to head (37d8745).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5772      +/-   ##
==========================================
- Coverage   59.42%   59.40%   -0.03%     
==========================================
  Files         347      347              
  Lines       29402    29423      +21     
==========================================
+ Hits        17472    17478       +6     
- Misses      10958    10971      +13     
- Partials      972      974       +2     

@vvoland vvoland requested a review from a team January 27, 2025 11:32
@vvoland vvoland requested a review from thaJeztah January 27, 2025 13:29
@thaJeztah
Copy link
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
Copy link
Member

thaJeztah commented Jan 27, 2025

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

@vvoland
Copy link
Collaborator Author

vvoland commented Jan 29, 2025

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

@vvoland vvoland marked this pull request as draft January 29, 2025 13:28
Sign up for free to 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