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 ls: show each tag for an image as a separate entry #5556

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

Commits on Oct 19, 2024

  1. image ls: show each tag for an image as a separate entry

    A single image can be tagged under multiple names. While they are the
    same image under the hood (same digest), we always presented these as
    separate images in the list.
    
    This patch applies the same behavior for the tree view; we can consider
    having some "compact" presentation in future where we collapse these iamges
    (perhaps introducing a "names" column?)
    
    Before this patch:
    
        $ docker pull --quiet alpine:3.20
        docker.io/library/alpine:3.20
        $ docker pull --quiet alpine:latest
        docker.io/library/alpine:latest
    
        $ docker image ls --tree
    
        IMAGE                   ID             DISK USAGE   CONTENT SIZE   USED
        alpine:3.20
        alpine:latest           beefdbd8a1da       13.6MB         4.09MB
        ├─ linux/arm64/v8       9cee2b382fe2       13.6MB         4.09MB
        ├─ linux/amd64          33735bd63cf8           0B             0B
        ├─ linux/arm/v6         50f635c8b04d           0B             0B
        ├─ linux/arm/v7         f2f82d424957           0B             0B
        ├─ linux/386            b3e87f642f5c           0B             0B
        ├─ linux/ppc64le        c7a6800e3dc5           0B             0B
        ├─ linux/riscv64        80cde017a105           0B             0B
        └─ linux/s390x          2b5b26e09ca2           0B             0B
    
    With this patch applied:
    
        $ docker image ls --tree
    
        IMAGE                   ID             DISK USAGE   CONTENT SIZE   USED
        alpine:3.20             beefdbd8a1da       13.6MB         4.09MB
        ├─ linux/arm64/v8       9cee2b382fe2       13.6MB         4.09MB
        ├─ linux/amd64          33735bd63cf8           0B             0B
        ├─ linux/arm/v6         50f635c8b04d           0B             0B
        ├─ linux/arm/v7         f2f82d424957           0B             0B
        ├─ linux/386            b3e87f642f5c           0B             0B
        ├─ linux/ppc64le        c7a6800e3dc5           0B             0B
        ├─ linux/riscv64        80cde017a105           0B             0B
        └─ linux/s390x          2b5b26e09ca2           0B             0B
    
        alpine:latest           beefdbd8a1da       13.6MB         4.09MB
        ├─ linux/arm64/v8       9cee2b382fe2       13.6MB         4.09MB
        ├─ linux/amd64          33735bd63cf8           0B             0B
        ├─ linux/arm/v6         50f635c8b04d           0B             0B
        ├─ linux/arm/v7         f2f82d424957           0B             0B
        ├─ linux/386            b3e87f642f5c           0B             0B
        ├─ linux/ppc64le        c7a6800e3dc5           0B             0B
        ├─ linux/riscv64        80cde017a105           0B             0B
        └─ linux/s390x          2b5b26e09ca2           0B             0B
    
    Signed-off-by: Sebastiaan van Stijn <[email protected]>
    thaJeztah committed Oct 19, 2024
    Configuration menu
    Copy the full SHA
    7187c78 View commit details
    Browse the repository at this point in the history