-
Notifications
You must be signed in to change notification settings - Fork 442
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
buildx build --platform ...
uses wrong image
#844
Comments
If |
Is there a case in which getting an image of not the specified At least buildx should show a warning. |
I agree with @andyli. Unless I'm missing something, as it stands today, the only way to prevent an automated build system using |
@thaJeztah @crazy-max I think we have given people enough time to move away from broken builders where the config and binary arch does not match and upgrade to multi-arch. I'm ok with breaking backward compatibility and making this case error. We could provide a build-arg to bypass the error. WDYT? |
Just want to point out another really confusing thing here: If you run a This may be for some sort of backward compatibility (?) but it was a big red herring for me when I was investigating. |
@tonistiigi Any update on this issue? I came across this behaviour and it took me by surprise too. |
I recently split a When using Just adding another scenario with local image builds where this was a surprise as I didn't want the ARM64 stage as part of the AMD64 build, thinking |
@polarathene Create a separate issue with a reproducer. It is unlikely that this is the same issue if you are combining builds with bake using named contexts. |
Count me as yet another person that found this behavior beyond surprising. We were trying to build a multi-arch image using Instead, it "successfully" built two images, apparently multi-arch when checked from the outside. Running Fallbacks are always risky without some compensating control to allow strictness to be enforced, but generating something totally contrary to the inputs while simultaneously claiming that they do, and not generating a single warning... this is a critical bug in my view. It's hard to see how it's been open since 2021. |
When building
FROM
an image not built for the target platform, buildx just uses it without error, but I think it should throw.For example,
Building for
linux/arm64
:Notice
uname -m
printedx86_64
.My buildx version:
The text was updated successfully, but these errors were encountered: