docker / roadmap

Welcome to the Public Roadmap for All Things Docker! We welcome your ideas.
https://github.com/docker/roadmap/projects/1
Creative Commons Zero v1.0 Universal
1.46k stars 246 forks source link

Show the "Manifest List" / "OCI Index" digest in the UI #262

Closed tianon closed 2 months ago

tianon commented 2 years ago

Tell us about your request

Right now, the tags listing UI shows the image digest for each architecture, but not the image digest for the overall manifest list (or OCI index, depending on your terminology preference). This causes concrete user confusion in that docker pull (and other tools) will show the manifest list digest (https://github.com/moby/moby/issues/40636, https://github.com/docker/hub-feedback/issues/1925, for example).

Which service(s) is this request for?

Docker Hub :smile:

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?

Ideally, I'd love to be able to docker pull something and validate that the digest listed in the output there is the one I see on Docker Hub. However for myself, the bigger thing I want is to be able to choose a tag from the Hub UI, copy the digest of the manifest list, and then be able to reference that digest no matter which architecture I end up running on.

Are you currently working around the issue?

I currently work around this by using the Registry APIs directly instead of getting this from the UI. :disappointed:

andrewchen5678 commented 2 years ago

+1

jaycuse commented 2 years ago

As a user, I was confused. I support this request.

the-dreamdevil commented 2 years ago

+1

daniel-shuy commented 1 year ago

Really need this feature to easily get the latest cross-platform digest to pin images to.

In the meantime, to get the overall manifest list from the Docker Hub Registry API:

curl https://auth.docker.io/token?scope=repository:$image:pull&service=registry.docker.io

where $image is the Docker image name (if it is an official image, prefix it with library/).

This will return a JWT token in the format:

{
  "token", ...,
  "expires_in": ...,
  "issued_at": ...
}

The Bearer Token is the value in token.

curl -v -H "Accept: application/vnd.docker.distribution.manifest.list.v2+json"  -H "Authorization: Bearer $token"  "https://registry-1.docker.io/v2/$image/manifests/$tag"

where $token is the Bearer token from the previous API request, $image is the Docker image name (if it is an official image, prefix it with library/), $tag is the Docker image tag.

The overall manifest list digest can be found in the DOCKER-CONTENT-DIGEST/ETAG response header (in the format sha256:...).

taoeffect commented 1 year ago

Thanks @daniel-shuy. It's nuts DockerHub doesn't show that on their website. How else are people supposed to verify the hashes? Crazy.

thaJeztah commented 1 year ago

Let me copy my comment from https://github.com/moby/moby/issues/40636#issuecomment-595985775;

perhaps both the "manifest list" digest, and the digest for the selected image (platform/architecture) should be shown. Currently it's confusing, because the digest is shown underneath the image name, but is actually referring to the digest for the selected architecture.

Something like this;

digests copy
Mohammad-Kabajah commented 1 year ago

+1

GabriFedi97 commented 1 year ago

+1

spurin commented 1 year ago

+1 - I recently created a lesson on this and already I've had two confused students reach out and mention that what they see in Docker Hub doesn't match what they see in the pull command. It's fine of course if the container image is single platform only but, given that multi arch containers are essential (especially with the likes of apple silicon), this could really do with an update.

An alternative UI viewpoint suggestion to complement the one from @thaJeztah . This was a quick modification to the html in chrome using inspect elements. Given that real estate is now being taken up by Scout, the OS/ARCH specific digest is at the bottom with the main one seen in the docker pull output, being prominent at the top.

image

% docker pull alpine
Using default tag: latest
latest: Pulling from library/alpine
c41833b44d91: Already exists
Digest: sha256:124c7d2707904eea7431fffe91522a01e5a861a624ee31d03372cc1d138a3126
Status: Downloaded newer image for alpine:latest
docker.io/library/alpine:latest
vttranlina commented 1 year ago

+1

pxlfrk commented 1 year ago

+1

kevin-wyx commented 11 months ago

+1 It makes sense to also show the digest output of docker pull in the Docker Hub UI.

taoeffect commented 11 months ago

I think this is a signal that Docker needs to be forked by some intrepid group that is willing to maintain it and cares more about security. This issue is so trivial to fix and yet it has been open for two years now.

dfuentes77 commented 8 months ago

How is this still an open issue?!

rlSimonLi commented 8 months ago

If Docker is really serious about pushing multi-arch, they really need to add this.

teeks99 commented 7 months ago

+1

kilrau commented 5 months ago

+1

kilrau commented 4 months ago

+1

this causes so much confusion and PAIN

thaJeztah commented 3 months ago

Looks like this was deployed @lukoboi ? https://github.com/docker/hub-feedback/issues/1925#issuecomment-1999995876

Closing this as I've just added the digest on hub šŸŽ‰ The index digest will be displayed when present now.

Screenshot 2024-03-15 at 16 05 54

lukoboi commented 2 months ago

@thaJeztah this has now been deployed šŸ˜„

thaJeztah commented 2 months ago

Awesome! I think you made a lot of people happy (myself included) I'll go ahead and close this ticket šŸ„³ šŸ„³ šŸ„³