truly static build?

This commit is contained in:
Hyatt 2022-02-01 13:29:35 -06:00
parent 182d288b97
commit 19f3ef27a4
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -27,7 +27,8 @@ RUN set -x && \\
go build \\
-v \\
-tags timetzdata \\
-ldflags="-s -w -X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitHash=\${GIT_HASH}' -X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitTag=\${GIT_TAG}'" \\
-a \\
-ldflags="-s -w -X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitHash=\${GIT_HASH}' -X 'github.com/salesforce/generic-sidecar-injector/pkg/metrics.gitTag=\${GIT_TAG}' -linkmode external -extldflags '-static'" \\
-installsuffix cgo \\
-o sidecarinjector \\
./cmd/sidecarinjector && \\
@ -90,7 +91,7 @@ podTemplate(
functions.buildContainer(
repository: repository,
imageDest: "${repository}/library/generic-sidecar-injector:latest-debug",
imageDest: "${repository}/library/generic-sidecar-injector:latest",
dockerFile: dockerFile,
repoCreds: repositoryCreds,
)