-
Notifications
You must be signed in to change notification settings - Fork 64
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
Layer digests are not preserved after foreign layer removal #519
Comments
Hi, I tried to repro your scenario with the following steps on a Windows 11 host.
I saw the same information (including sizes) across all the images in steps 2, 4, and 7. Are you doing anything else? We don't expect to see the image changing at all when pushing/pulling to the Azure Container Registry (ACR). |
Please follow the steps as I've defined them. Your steps are different and don't demonstrate the issue. First, I'm using |
@mthalman Thank you for your patience as I've been diving more into this issue. I tested
Here are the sizes for the layer of each:
We can see slight variations in size, with Docker Hub and ACR being about 3% larger. This is normal and can attributed to the following factors:
|
I'm still trying to investigate why we're seeing differences in behavior between Windows and Linux. For Windows, the image digests change when tagged, but not for Linux. This may be due to how the reparse points are handled when we're getting ready to export the image to a repository. Example
"config": {
"size": 638,
"digest": "sha256:e82f76d7080851ee8fead794e4eb957de1150f1a84270fa5d660e14582782ce2"
},
"config": {
"size": 638,
"digest": "sha256:f0ca296450062003226b7b71be17afe4ccb62ff1b50995b07c20772c29359551"
},
"config": {
"size": 1486,
"digest": "sha256:0b4426ad4bf25e13fb09112b9dcb5d5b09b3c5684599654583913b2714a705a2"
},
"config": {
"size": 1486,
"digest": "sha256:0b4426ad4bf25e13fb09112b9dcb5d5b09b3c5684599654583913b2714a705a2"
}, |
Is this related to goharbor/harbor#20143 goharbor/harbor#20133 ? |
@mthalman Also taking a look at your original output, do you consistently see that the config digest field stays the same? Or does it change between the originally pulled image and tagged version?
→ Config Digest:
→ Config Digest: |
It stays the same. My original post includes the config digest output and indicates they are the same. This behavior is consistent. |
Alright, that's not great. It looks like the configuration object isn't consistently indicating whether the image is valid. I'll have to find out why (1) layers are changed and (2) why some config objects are reflecting that or not. Thanks for the confirmation. |
This issue has been open for 30 days with no updates. |
1 similar comment
This issue has been open for 30 days with no updates. |
Ever since the removal of foreign layers from Windows images, there's unexpected behavior with respect to the digest of the base Windows layer. When pushing an image to a registry that is based on a Windows image, the base image layer (which corresponds to the base Windows image) does not match the original image. This is unexpected (for example, Linux images do not behave this way).
Repro Steps
Notice that the layer digests,
4f08abc68a60a91547c026d50bc32384338152a95155ab082f6ea8aaf874d94b
vs652774a5d82a114642848f8b0b8d486ec1b4995f9dda56e36fe4ac7563429990
, are different. They even have different sizes.The text was updated successfully, but these errors were encountered: