Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
SO, what _is_ the way to compute the docker image id from a v2 registry? #4
Hey, sorry: not really an 'issue', but
That i'm trying to do what you have evidently already done: figure out how to take a locally generated Docker 1.10 'imageID' for a given imae name and tag 'myapp:1.7' and then find out whether the registry version of myapp:1.7 points to a different image?
I gathered from your post that the magic answer is to do HEAD /v2/myapp/manifests/1.7 and then look for the docker-content-digest header, and that should match what docker says is the image id right?
Somehow this isnt the case for me. when i do a HEAD request, i do not get the header back. When i do a GET request, i get the header, but the digest returned doesnt match my image id.
Have you figured this out?
Hey @dcowden , I really should just link the SO post and the repo, shouldn't I? :-)
I had banged my head on it for a while. Mainly, I wanted to be able to pull an image directly, which meant comparing it. I started to do that, but never got around to finishing it.
I think your description is correct. See from https://gist.github.com/aaronlehmann/b42a2eaf633fc949f93b#new-image-config :
Tell me how you are testing it?
OK, so I just did another test. I just checked the hashes for
So it shows the digest as
Hmm, that definitely is not the same.
So we have 2 hashes here:
I hoped @thaJeztah would help there...
Yes, that's exactly what i found as well. i was able to see that the digest
So at this point, my conclusion is that docker has completely broken the
My objective is to determine if a local image ( pulled via tag) is up to
So at this point, I've concluded that there is literally no way to
On Thu, Apr 21, 2016 at 5:32 AM, Avi Deitcher email@example.com
No, it cannot be. Because if you do
The entire comparison is between the contents and headers of the manifest retrieved via
If you look in
Even more interesting, what is returned is giving a
Really having a hard time making heads or tails of this.
It is certainly possible that the docker client computes an ID which is
My guess is that what's happening is that its storing the digests
On Thu, Apr 21, 2016 at 9:03 AM, Avi Deitcher firstname.lastname@example.org
well to some extent i think the opaqueness is by design, the v2 api was all
I've learned that the digest is actually a sha 256 hash of the manifiest,
But then what in the world is the image id??
Exactly. I cannot figure that out either. Its the hash of something. but
On Thu, Apr 21, 2016 at 9:17 AM, Avi Deitcher email@example.com
awesome thanks, i'll watch that one.
On Thu, Apr 21, 2016 at 9:30 AM, Avi Deitcher firstname.lastname@example.org