Allow override of CGO_ENABLED=0
When building inside a docker container, we fail to pass along enough information for KUBE_CGO_OVERRIDES. The original PR was geared towards building the binary from the command line -dca376a03e
-e4ded2b3ec
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
@@ -716,6 +716,7 @@ kube::golang::build_binaries_for_platform() {
|
||||
-ldflags "${goldflags:-}"
|
||||
-tags "${gotags:-}"
|
||||
)
|
||||
V=1 kube::log::info "> static build CGO_ENABLED=0: ${statics[*]}"
|
||||
CGO_ENABLED=0 kube::golang::build_some_binaries "${statics[@]}"
|
||||
fi
|
||||
|
||||
@@ -728,6 +729,7 @@ kube::golang::build_binaries_for_platform() {
|
||||
-buildmode pie
|
||||
-tags "${gotags:-}"
|
||||
)
|
||||
V=1 kube::log::info "> non-static build: ${nonstatics[*]}"
|
||||
kube::golang::build_some_binaries "${nonstatics[@]}"
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user