-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
multi stage image with --platform - final image is of build architecture #1057
Comments
I think the difference is that you had the ubuntu image locally in |
Thanks so much for the reproduction and explanation. You're undoubtedly right about ubuntu being local, I just haven't managed to remove it (even with Is there a containerd issue tracking the lack of platform information? I couldn't see it in the resolved or open list. |
@grooverdan I think @tonistiigi is referring to moby/moby#38043 (which is a big change, but actively being worked on) |
Interestingly docker --platform takes the first FROM as the target architecture and others at the native architecture:
Dockerfile.platformargs:
I would of assumed the final image would be of the target architecture.
The first image architecture, if there are multiple images is less obvious as to what is the choice. When you have a multiple FROM statements in a multi-stage image its fairly obvious that the last one is of the target. Earlier stages however are more ambiguous, they could be of the build (native) architecture to cross-compile some artefacts, or build architecture agnostic artefacts (which is faster not emulated), or they could be of the target architecture to have components.
I was going to test with
docker buildx
to see what behaviour it exhibited but its currently not recognising the buildx plugin install.The text was updated successfully, but these errors were encountered: