-
Notifications
You must be signed in to change notification settings - Fork 788
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
skopeo inspect digest differs from docker images --digest #469
Comments
@mtrmac do you happen to know why? |
Sure, 436bb… is the digest of the manifest list. The two images can probably be paired using their config digest (i.e. containers/image#288 will allow us to record the original manifest (but not the higher-level manifest list), and only for images pulled via skopeo, not |
@mtrmac Where is 'docker images --digests' getting the 436bb digest value? It is recalculating it on the fly? |
What are you actually trying to do, or what question are the digests supposed to answer? |
I would like to match a docker-daemon (ie. locally pulled) image to its exact match in a registry. The registry in my case is foreman/pulp/crane (Satellite-6). From a user perspective, I'd like to provide instructions along the line of "Run $something on your host then use $unique-id to look up the image in foreman." The $unique-id, I thought, was the digest. This would be applicable to for image signatures, or image scanning results, or history info, or whatever I manage to pack into foreman. Is that realistic? Thoughts on how to approach this cross-reference through something besides digest? |
If the Docker version provides If If |
Running into a similar issue:
So, all tooling agrees
Ugh, what happened?
Looks like there's agreement the digest of the exported image is indeed Oddly enough:
Now, after removing I guess there's basically no way to know for sure an export (using (Rant: time and time again I get to experience Docker image 'distribution' (the spec), digest management, integrity,... is a complete disaster). |
Before dealing with the intricacies of the implementations, what are you ultimately trying to do?
c/image, in the implementation of (FWIW c/storage, and
Not really; it’s not at all guaranteed that the result of a schema2→archive→schema2 conversion will have a consistent digest over time (the conversion implementation can change), nor that it will be the same as the result of a registry→ The value happens to be the same in this case because none of the operations have changed the
Yes:
Strictly speaking, that’s trivial: “it’s not the same”, an archive uses a different format. If you want to know whether it has been maliciously modified…
But if you want to preserve exactly the same image across copies over registries (or, well, what is it that you are really trying to do), I would strongly recommend staying completely away from Again, depends on what are you ultimately trying to do. |
@thomasmckay Could you answer @mtrmac Questions, or should I close this issue? |
@mtrmac I completely missed your reply, sorry. So, getting back to #469 (comment): Indeed, as you guessed, the intent is to be able to retrieve -> store -> distribute -> ingest -> pull -> run images based on a static description of said image (i.e. some hash of it) in a repeatable way. I was using Overall, it looks like I may want/need to give up on the original goal, given how (at least Docker) image management is not really embracing blob checksums as identifiers for images across their lifecycle/exports/pushes/... I should spend some more time using |
No. But, you can “easily enough” run a docker/distribution registry server container with a volume mounted into the container’s storage directory, copy images to that registry, then shut down the container, move the volume data elsewhere, and run a similar container elsewhere and pull from it. (The docker/distribution protocol is pretty close to being able to be served using a plain HTTP server, but not quite there — e.g. it needs to return the correct |
I considered that at some point, but it doesn't fit our needs for a couple of reasons, one of them it being not very 'composable'.
Well, thanks to your It basically allows you to
CI then tests whether Not meant to be a fully-compliant distribution-API implementation, but does 'good enough' for those runtimes/clients to work. |
This works for me:
|
As much as this bug has been useful to discuss the various digest values and what happens during copies, it’s not clear what Skopeo can or should do about all the consequences of the various design decisions. If anyone has specific needs not covered by the conversations above, please file separate issues. |
Inspecting an image with skopeo vs. docker gives different digest values
The text was updated successfully, but these errors were encountered: