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
buildkit: normalize build target and local platform #42951
Conversation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Failures are unrelated (and most should now be fixed on master) |
@crazy-max This still fails if using "docker buildx build --load" on both build commands. Is that by design? If so, is there a way to use local images with buildx?
|
Hello I still got this bug as well @crazy-max @thaJeztah
|
Note that Also, from your command ( |
The problem occurs on my local machine, but it also occurs on github actions, where we use |
From the |
Thanks @thaJeztah this resolves my problem 🎉 |
This still fails with |
Fixes #42893
Fixes docker/buildx#795
Fixes docker/for-mac#6009
- What I did
When resolving a local reference to build an image with BuildKit, we need to normalize the two platforms (reference and target platform) before matching them otherwise it would fallback to remote and fail with:
If we check daemon logs we have:
- How I did it
Normalize local and target platform before matching them.
- How to verify it
On M1 host:
- A picture of a cute animal (not mandatory but encouraged)
cc @thaJeztah @tonistiigi