diff --git a/build/hello-kubernetes/prepare.sh b/build/hello-kubernetes/prepare.sh index 59143bf0dc2c7..35726959745b1 100755 --- a/build/hello-kubernetes/prepare.sh +++ b/build/hello-kubernetes/prepare.sh @@ -17,4 +17,4 @@ set -e set -x -CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static" -s' hello.go +CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags '-extldflags "-static" -s' hello.go diff --git a/cluster/addons/dns/kube2sky/Makefile b/cluster/addons/dns/kube2sky/Makefile index aa402f508e451..69738b45976c6 100644 --- a/cluster/addons/dns/kube2sky/Makefile +++ b/cluster/addons/dns/kube2sky/Makefile @@ -1,7 +1,7 @@ all: kube2sky kube2sky: kube2sky.go - CGO_ENABLED=0 go build -a --ldflags '-w' ./kube2sky.go + CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' ./kube2sky.go container: kube2sky sudo docker build -t kubernetes/kube2sky . diff --git a/cluster/addons/dns/skydns/Makefile b/cluster/addons/dns/skydns/Makefile index d29c3c371089f..140d6a8cdd319 100644 --- a/cluster/addons/dns/skydns/Makefile +++ b/cluster/addons/dns/skydns/Makefile @@ -1,7 +1,7 @@ all: skydns skydns: - CGO_ENABLED=0 go build -a --ldflags '-w' github.com/skynetservices/skydns + CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' github.com/skynetservices/skydns container: skydns sudo docker build -t kubernetes/skydns . diff --git a/contrib/for-demos/serve_hostname/Makefile b/contrib/for-demos/serve_hostname/Makefile index a5da47b43f66f..1a44148ef4c62 100644 --- a/contrib/for-demos/serve_hostname/Makefile +++ b/contrib/for-demos/serve_hostname/Makefile @@ -3,7 +3,7 @@ all: serve_hostname TAG = 1.0 serve_hostname: serve_hostname.go - CGO_ENABLED=0 go build -a --ldflags '-w' ./serve_hostname.go + CGO_ENABLED=0 go build -a -installsuffix cgo --ldflags '-w' ./serve_hostname.go container: serve_hostname sudo docker build -t kubernetes/serve_hostname:$(TAG) . diff --git a/contrib/for-demos/test-webserver/Makefile b/contrib/for-demos/test-webserver/Makefile index 84345d107d7a0..87ff0c3810d19 100644 --- a/contrib/for-demos/test-webserver/Makefile +++ b/contrib/for-demos/test-webserver/Makefile @@ -1,7 +1,7 @@ all: push test-webserver: test-webserver.go - CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w' ./test-webserver.go + CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./test-webserver.go container: test-webserver sudo docker build -t kubernetes/test-webserver . diff --git a/contrib/for-tests/network-tester/Makefile b/contrib/for-tests/network-tester/Makefile index d71bd381cf9fb..8c69bf0e6dfa6 100644 --- a/contrib/for-tests/network-tester/Makefile +++ b/contrib/for-tests/network-tester/Makefile @@ -1,7 +1,7 @@ all: push webserver: webserver.go - CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w' ./webserver.go + CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./webserver.go container: webserver sudo docker build -t kubernetes/nettest . diff --git a/examples/liveness/image/Makefile b/examples/liveness/image/Makefile index 5ec1723646d66..2ea47d1263440 100644 --- a/examples/liveness/image/Makefile +++ b/examples/liveness/image/Makefile @@ -1,7 +1,7 @@ all: push server: server.go - CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w' ./server.go + CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./server.go container: server docker build -t kubernetes/liveness .