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 copy from docker hub gets a different hash than using Docker pull #954
Comments
|
Thanks for your report. I don’t have access to the signature file, and I don’t know how it was created, so I’m somewhat guessing; still: The reported issue failure is that the signature signs a manifest digest contained in the error message (e4acb2be7755…), but the image on the registry actually has a different one (I see 318233145b6…). So the signature is correctly rejected as not matching. The signature signs a specific representation of the image (the specific way the layers have been compressed, and the resulting manifest — the specific representation of that manifest). It seems that the signature was created to sign the The typical workflow to create signatures is:
It is of course possible to build this manually using |
|
Hej, thanks for replying. The explanation on the compressed part looks like answered my original question.
Apology for the inconvenience, I did not think you would try to reproduce at your end, but it is a public GitHub repo:
Indeed, we want to integrated the build and sign process into the pipeline. Are you suggesting that the Can you please give me an example to use the
I used the Skopeo 0.1.40 to sign, does it requires to the same version to verify? |
That could work in principle, but it’s not quite optimal: step 2 will create an image with uncompressed layers, and the image would have to be uploaded to the Docker Hub unmodified=uncompressed. Do you need to use A plain
(
This works, but I’d recommend using a fully-qualified name
Here’s the most immediate problem. The
It’s more of a
Actually, from a quick look (no personal experience), it should be possible to use
For the specific case of (OTOH, once the image is copied out of there, e.g. the So, your workflow that copies the image out of |
|
Could you maybe, instead of examining effects of a specific sequence of commands, describe what you ultimately need to do, i.e. what are the inputs to the process that can’t be changed, what are the necessary outputs of the process that can’t be changed, and what are any other constraints? |
|
Hej, Thanks for your reply. Speaking of my need, we produce images on amd64, power and z platforms, and I want to get the image on amd64 platform signed. This 3 images will be combined into a fat manifest, so in total 3 images plus 1 fat manifest will be pushed to Docker Hub. When customers came, they can get the fat manifest pull down and verify the signature with our public key, public cert and chain 0 cert, if they are pull from an amd64 platform. And if the images were copy from docker hub into other registry, the customers shall be still able to verify the signature with our public key, public cert and chain 0 cert. As for A question here, how did you get the signature file, if you use I can see the following message when I use but I have no clue where to extract the signature file. if I pull back with In the issue #953 (comment), I saw you commented:
Do you meant to The problem we are facing is the 3 platforms images were produced on a different VM at different time, I would face difficulty to gather the 3 images at the build time. |
(That’s not how
It’s either stored on the registry directly, or in a
Yes, this makes a
Reportedly |
|
Hej, Thanks for your response, looks like I wont be able to get the signature files from docker hub. |
|
@Kenzku I’m not quite clear on the state of the issue. Is there anything specific we can help with? |
|
Since we never got more information, I am closing, reopen if more info is available. |
I used skopeo copy to get image from docker:
I then tried to verify it:
I got error saying that:
Error verifying signature: Signature for docker digest "sha256:e4acb2be7755fda509e3f7b01eabc5ff389fc729b5cb004f94b05d880ea2fd52" does not match
However, if I tried to pull the image with docker pull:
docker pull ibmcom/icp-transformation-advisor-ui:2.3.0-test-1-amd64Then, use the skopeo copy from local docker:
then I can verify the images with the
skopeo standalone-verifyI noticed that the layers are different between the 2 ways of pulling images.
I was wondering if I did something wrong, or is there an issue in the
skopeo copy?The text was updated successfully, but these errors were encountered: