dockerTools.*: Assertion against building for darwin
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
This commit is contained in:
parent
a1628d9805
commit
b6a9211bf4
1 changed files with 4 additions and 0 deletions
|
@ -589,6 +589,8 @@ rec {
|
|||
if tag == null
|
||||
then lib.head (lib.splitString "-" (lib.last (lib.splitString "/" result)))
|
||||
else lib.toLower tag;
|
||||
# Docker can't be made to run darwin binaries
|
||||
meta.badPlatforms = lib.platforms.darwin;
|
||||
} ''
|
||||
${if (tag == null) then ''
|
||||
outName="$(basename "$out")"
|
||||
|
@ -719,6 +721,8 @@ rec {
|
|||
layerClosure = writeReferencesToFile layer;
|
||||
passthru.buildArgs = args;
|
||||
passthru.layer = layer;
|
||||
# Docker can't be made to run darwin binaries
|
||||
meta.badPlatforms = lib.platforms.darwin;
|
||||
} ''
|
||||
${lib.optionalString (tag == null) ''
|
||||
outName="$(basename "$out")"
|
||||
|
|
Loading…
Reference in a new issue