-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
23 lines (19 loc) · 684 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM golang:1.21 as build-env
ARG TARGETARCH
ARG VERSION=dev
ENV GO111MODULE=on \
CGO_ENABLED=0 \
GOOS=linux \
GOARCH=$TARGETARCH
WORKDIR /tmp/secrets-store-csi-driver-provider-gcp
COPY . ./
RUN go get -t ./...
RUN make licensessave
RUN go install \
-trimpath \
-ldflags "-s -w -extldflags '-static' -X 'main.version=${VERSION}'" \
github.com/GoogleCloudPlatform/secrets-store-csi-driver-provider-gcp
FROM gcr.io/distroless/static-debian10
COPY --from=build-env /tmp/secrets-store-csi-driver-provider-gcp/licenses /licenses
COPY --from=build-env /go/bin/secrets-store-csi-driver-provider-gcp /bin/
ENTRYPOINT ["/bin/secrets-store-csi-driver-provider-gcp"]