Skip to content
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

Cache layer conflicts when building for multi-platform images #3350

Open
luncheungdd opened this issue Oct 24, 2024 · 0 comments
Open

Cache layer conflicts when building for multi-platform images #3350

luncheungdd opened this issue Oct 24, 2024 · 0 comments

Comments

@luncheungdd
Copy link

Actual behavior
We use Kaniko to build two images with the same Dockerfile. One is for x86 architecture and the other one is for Arm64. The x86 image is built using a x86 node. The Arm64 image is built using an Arm64 node. When we set the --cache-repo as the ECR repo, Kaniko sometimes stores the same cache layer for both architectures into the same ECR repo. This results in the Arm64 docker image not being compatible with Arm64 architecture as some layers were built with x86. Is there a way to specify the layer that corresponds to each architecture?

Expected behavior
Each docker image should use the cache layer that corresponds to the architecture that was used to build the docker image.

To Reproduce
Steps to reproduce the behavior:

  1. ...
  2. ...

Additional Information

  • Dockerfile
    Please provide either the Dockerfile you're trying to build or one that can reproduce this error.
  • Build Context
    Please provide or clearly describe any files needed to build the Dockerfile (ADD/COPY commands)
  • Kaniko Image (fully qualified with digest)

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

2 participants
@luncheungdd and others