.
This commit is contained in:
parent
d81e63b5d8
commit
8b4b589903
@ -14,18 +14,19 @@ COPY generic-sidecar-injector/ /go/src/app/
|
||||
|
||||
WORKDIR /go/src/app
|
||||
|
||||
RUN apk add --no-cache git upx && \\
|
||||
RUN set -x && \\
|
||||
apk add --no-cache git upx && \\
|
||||
addgroup -S -g 1000 app && \\
|
||||
adduser --disabled-password -G app --gecos "application account" --home "/home/app" --shell "/sbin/nologin" --no-create-home --uid 1000 app && \\
|
||||
go mod download && \\
|
||||
GIT_HASH="$$(git rev-parse --short HEAD) && GIT_TAG=$$(git tag | tail -1)"" && \\
|
||||
GIT_HASH="\$(git rev-parse --short HEAD) && GIT_TAG=\$(git tag | tail -1)"" && \\
|
||||
CGO_ENABLED="0" && \\
|
||||
GOOS="linux" && \\
|
||||
GOARCH="amd64" && \\
|
||||
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}'" \\
|
||||
-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}'" \\
|
||||
-installsuffix cgo \\
|
||||
-o sidecarinjector \\
|
||||
./cmd/sidecarinjector && \\
|
||||
|
Reference in New Issue
Block a user