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
SO, what _is_ the way to compute the docker image id from a v2 registry? #4
Comments
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.
That matches
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 notifications@github.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 notifications@github.com
|
It is possible. But I would expect that to be in the header... oh, wait, right. We are trying to find something in the content header. But then what in the world is the image id?? |
And why am I getting back |
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 notifications@github.com
|
And we see how far that has gotten. :-) But what version of the schema? V2 registry has v1 schema and v2 schema. And what parts do you hash? I fail to understand why this cannot simply be written up. |
I am going to open a new issue. Here: distribution/distribution#1662 I guess we always could look at the docker source code.... |
awesome thanks, i'll watch that one. On Thu, Apr 21, 2016 at 9:30 AM, Avi Deitcher notifications@github.com
|
Hey, sorry: not really an 'issue', but 👍
I saw in this post:
http://stackoverflow.com/questions/34568746/what-is-the-relationship-between-a-docker-image-id-and-the-ids-in-the-manifests
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?
The text was updated successfully, but these errors were encountered: