Skip to content

Add support for referencing images via their 'short sha' #104

Description

@adityaramani

Today if I have an image that is only referenced via a sha - its not easy for me to delete this image. For example

container i pull alpine@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715

container i ls
NAME    TAG     DIGEST
alpine  <none>  8a1f59ffb675680d47db6337...

container i rm  alpine:8a1f59ffb675680d47db6337
Error: internalError: "failed to delete one or more images: ["alpine:8a1f59ffb675680d47db6337"]"

It is only if I use the -q flag with image ls is the full sha returned which can be used to perform the delete operation.

container i ls -q
alpine@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715

container i rm  alpine@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715
docker.io/library/alpine@sha256:8a1f59ffb675680d47db6337b49d22281a139e9d709335b492be023728e11715
Reclaimed 650.8 MB in disk space

It would make it easier we could use the short sha which is displayed during the output of image ls to refer to an image

Activity

  1. self-assigned this
    on Jun 10, 2025
  2. briansmith commented on Jul 16, 2026

    @briansmith

    Alternatives would be to support tab autocompletion of the short digest to the long one, and/or display the full digest in ls.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions