Skip to content

Kaniko fails to push images with duplicate layers with identical diff IDs but differing blobs #3431

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

Open
JacobHenner opened this issue Mar 28, 2025 · 0 comments

Comments

@JacobHenner
Copy link

Actual behavior

Kaniko fails to push images that have duplicated layers, where such layers have identical diff IDs but differing blobs.

This issue was previously reported in go-containerregistry: google/go-containerregistry#2034

A fork of Kaniko purports to have worked around this limitation: coder#35

Expected behavior

Kaniko should be able to push the image, even if it has duplicated layers that match the conditions stated above. In case such images are considered invalid, Kaniko should at least display an error message explaining the cause of the problem.

To Reproduce

Steps to reproduce the behavior:

  1. Generate a simple container image (A) using Kaniko
  2. Append a tarball to image A using crane append, resulting in image A'
  3. Generate a new container image (B), using A' as its parent image.
  4. Append the same tarball from step 2 to image B using crane append, resulting in image B'
  5. Attempt to push B' to an empty container repo
  6. Observe MANIFEST_BLOB_UNKNOWN: blob unknown to registry when the duplicated layer is reached for the second time.

Additional Information

  • Kaniko Image (fully qualified with digest): gcr.io/kaniko-project/executor:v1.23.2-debug@sha256:c3109d5926a997b100c4343944e06c6b30a6804b2f9abe0994d3de6ef92b028e

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
Please check if this error is seen when you use --cache flag
Please check if your dockerfile is a multistage dockerfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant