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
dockerTools.*: Assertion against building for Darwin #77952
Conversation
b65a884
to
6e9ecb0
Compare
Does it also need to be x86_64 architecture? |
6e9ecb0
to
6bb9864
Compare
According to https://stackoverflow.com/a/52845392/6605742 it doesn't, so I now switched to |
Question to @grahamc: Is it possible to build a Linux docker image on macOS by doing it inside a Linux qemu VM? Because then this assertion might prevent people from doing that. Edit: |
If you change this from buildPlatform to hostPlatform, it should allow you to still cross compile a kernel from macOS to Linux and put it in a Docker image. |
Just noticing the different platforms here too, including |
It should remain possible to build the container on OSX, but get all binaries from cache or a nix-docker builder. |
6bb9864
to
4addd7d
Compare
Ah so the above link is about I initially confused hostPlatform and buildPlatform, I switched it around so that it's correct. |
4addd7d
to
db4ef63
Compare
@matthewbauer Looking good now? |
Note that Windows Docker images can be built for Windows, executing Windows binaries, too. |
(NO idea if anybody is using dockerTools to do that, so I wouldn't hold this PR back on that basis ... but maybe this PR would get reverted on that basis :) ) |
Building a docker image with darwin binaries just yields a confusing error when ran: standard_init_linux.go:211: exec user process caused "exec format error" This change prevents people from building such images in the first place
db4ef63
to
b6a9211
Compare
Hm yeah, I now changed it so:
|
I'll go ahead and merge this soon if nobody has any complaints |
dockerTools.*: Assertion against building for Darwin
Motivation for this change
Building a docker image with Darwin binaries just yields a confusing
error when ran:
This change prevents people from building such images in the first place
This PR is sponsored by Niteo ✨
Ping @grahamc @zupo
Things done