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 \\ go build \\
-v \\ -v \\
-tags timetzdata \\ -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 \\ -installsuffix cgo \\
-o sidecarinjector \\ -o sidecarinjector \\
./cmd/sidecarinjector && \\ ./cmd/sidecarinjector && \\
@ -90,7 +91,7 @@ podTemplate(
functions.buildContainer( functions.buildContainer(
repository: repository, repository: repository,
imageDest: "${repository}/library/generic-sidecar-injector:latest-debug", imageDest: "${repository}/library/generic-sidecar-injector:latest",
dockerFile: dockerFile, dockerFile: dockerFile,
repoCreds: repositoryCreds, repoCreds: repositoryCreds,
) )