[c8d] improve docker image ls --tree
for images with multiple names/tags
#5555
Labels
docker image ls --tree
for images with multiple names/tags
#5555
Description
--tree
flag #4982If an image is tagged under multiple names, only a single one of them is shown as tree, and for other variants, only the name is shown;
To reproduce;
We should either show each of those images separately;
Or, if we want to indicate "this is the same image, but tagged with multiple names" find some format where we group them;
Unfortunately, images don't have a "canonical" name, otherwise we could've put the canonical name in the first column, and an "optional" column for additional names.
Grouping such variants may not work well though, as (in my first example) images could originate from / have been tagged for multiple registries, or have many different tags, in which case the
IMAGE
column would be too wide to remain useful;From the API response; the API returns these images as a single item in the list, but lists all known tags under
RepoTags
("RepoTags": ["alpine:3.20", "alpine:latest"]
), so we should duplicate those entries when listing;The text was updated successfully, but these errors were encountered: