Container package should show Image ID in addition to Digest #12714

Open
opened 2025-11-02 10:18:53 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @Thalhammer on GitHub (Mar 23, 2024).

Feature Description

Currently the container view shows the image digest,
while most other tools (e.g. docker image list, docker inspect, Portainer)
all show the image id by default and only provide
the digest when specifically asked for.

I think gitea should ideally show both.

Screenshots

No response

Originally created by @Thalhammer on GitHub (Mar 23, 2024). ### Feature Description Currently the container view shows the image digest, while most other tools (e.g. `docker image list`, `docker inspect`, Portainer) all show the image id by default and only provide the digest when specifically asked for. I think gitea should ideally show both. ### Screenshots _No response_
GiteaMirror added the topic/packagestype/proposal labels 2025-11-02 10:18:53 -06:00
Author
Owner

@KN4CK3R commented on GitHub (Mar 23, 2024):

But the image id is just the first 12 chars of the image digest.

@KN4CK3R commented on GitHub (Mar 23, 2024): But the image id is just the first 12 chars of the image digest.
Author
Owner

@Thalhammer commented on GitHub (Mar 23, 2024):

But the image id is just the first 12 chars of the image digest.

No its not.
Take for example a look at the gitea image using docker image list --digests --no-trunc gitea/gitea:

REPOSITORY    TAG       DIGEST                                                                    IMAGE ID                                                                  CREATED       SIZE
gitea/gitea   1.21      sha256:daeeb33fb2f90d94876597f3b6c73956687c03250d5e5ca71104fc03b9c626b3   sha256:a09084c8eac7b2f395d1aa362e7792da5f6fade4587d1cb135d3aedf618d390c   3 weeks ago   160MB

The IMAGE ID is the the value thats usually shortened to 12 chars and in the normal list output. Its also the value visible in docker inspect (as Image) and in the container details of tools like portainer.
The DIGEST on the other hand is the hash thats displayed on the gitea details page and briefly shown when doing a docker pull.

I know this is a bit of a nit picky request, but it would be nice if gitea could show the image id in addition to the digest to make it easier to crossreference stuff.

@Thalhammer commented on GitHub (Mar 23, 2024): > But the image id is just the first 12 chars of the image digest. No its not. Take for example a look at the gitea image using `docker image list --digests --no-trunc gitea/gitea`: ``` REPOSITORY TAG DIGEST IMAGE ID CREATED SIZE gitea/gitea 1.21 sha256:daeeb33fb2f90d94876597f3b6c73956687c03250d5e5ca71104fc03b9c626b3 sha256:a09084c8eac7b2f395d1aa362e7792da5f6fade4587d1cb135d3aedf618d390c 3 weeks ago 160MB ``` The `IMAGE ID` is the the value thats usually shortened to 12 chars and in the normal list output. Its also the value visible in docker inspect (as `Image`) and in the container details of tools like portainer. The `DIGEST` on the other hand is the hash thats displayed on the gitea details page and briefly shown when doing a docker pull. I know this is a bit of a nit picky request, but it would be nice if gitea could show the image id in addition to the digest to make it easier to crossreference stuff.
Author
Owner

@KN4CK3R commented on GitHub (Mar 25, 2024):

Isn't that just a relic from older docker versions? On my system your command produces identical results:

gitea/gitea
grafik

other images on my system
grafik

@KN4CK3R commented on GitHub (Mar 25, 2024): Isn't that just a relic from older docker versions? On my system your command produces identical results: `gitea/gitea` ![grafik](https://github.com/go-gitea/gitea/assets/1666336/3112a49f-f844-4801-ac27-8e2ad5796708) other images on my system ![grafik](https://github.com/go-gitea/gitea/assets/1666336/f135a109-bee2-4a40-8c2f-12a9713a725e)
Author
Owner

@Thalhammer commented on GitHub (Mar 25, 2024):

Thats weird.
My I ask, what Docker version you are running ?
I tried a variety (23.x, 24.x) as well as 26.0.0, which according to github is the latest release and I don't have a single image (including a freshly pulled one) where digest and image id match.

@Thalhammer commented on GitHub (Mar 25, 2024): Thats weird. My I ask, what Docker version you are running ? I tried a variety (23.x, 24.x) as well as 26.0.0, which according to github is the latest release and I don't have a single image (including a freshly pulled one) where digest and image id match.
Author
Owner

@KN4CK3R commented on GitHub (Mar 25, 2024):

25.0.3 amd64 but version 26.0.0 aarch64 on a different system shows different IDs like your output.

@KN4CK3R commented on GitHub (Mar 25, 2024): 25.0.3 amd64 but version 26.0.0 aarch64 on a different system shows different IDs like your output.
Author
Owner

@Thalhammer commented on GitHub (Mar 25, 2024):

I sadly don't have a docker host that runs on 25.x, nor any non amd64 hosts to test it.

@Thalhammer commented on GitHub (Mar 25, 2024): I sadly don't have a docker host that runs on 25.x, nor any non amd64 hosts to test it.
Author
Owner

@KN4CK3R commented on GitHub (Mar 25, 2024):

Everything fine. https://github.com/opencontainers/image-spec/blob/main/config.md#imageid specifies what the "image id" is. Don't know why docker shows identical IDs on my system. Gitea currently shows the manifest "id" because only that info is needed to pull an image. Can't currently tell if and when the image id may be added to Gitea. Need more research first.

@KN4CK3R commented on GitHub (Mar 25, 2024): Everything fine. https://github.com/opencontainers/image-spec/blob/main/config.md#imageid specifies what the "image id" is. Don't know why docker shows identical IDs on my system. Gitea currently shows the manifest "id" because only that info is needed to pull an image. Can't currently tell if and when the image id may be added to Gitea. Need more research first.
Author
Owner

@Thalhammer commented on GitHub (Mar 25, 2024):

Can't currently tell if and when the image id may be added to Gitea.

No problem. Its not urgent, just a little thing I noticed while checking if whats committed to gitea actually made it correctly all the way to production.

@Thalhammer commented on GitHub (Mar 25, 2024): > Can't currently tell if and when the image id may be added to Gitea. No problem. Its not urgent, just a little thing I noticed while checking if whats committed to gitea actually made it correctly all the way to production.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#12714