File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 1- FROM gcr.io/distroless/static:latest
2- LABEL maintainers="Kubernetes Authors"
1+ ARG BASE_IMAGE
2+
3+ FROM golang:1.20 as builder
4+ WORKDIR /go/src/kubernetes-csi/external-snapshotter
5+ ADD . .
6+ ENV GOFLAGS="-buildvcs=false"
7+ RUN make build
8+
9+ FROM $BASE_IMAGE
10+ LABEL maintainers="Compute"
311LABEL description="CSI External Snapshotter Sidecar"
412ARG binary=./bin/csi-snapshotter
513
6- COPY ${binary} csi-snapshotter
14+ COPY --from=builder /go/src/kubernetes-csi/external-snapshotter/ ${binary} csi-snapshotter
715ENTRYPOINT ["/csi-snapshotter" ]
Original file line number Diff line number Diff line change 1- FROM gcr.io/distroless/static:latest
2- LABEL maintainers="Kubernetes Authors"
1+ ARG BASE_IMAGE
2+
3+ FROM golang:1.20 as builder
4+ WORKDIR /go/src/kubernetes-csi/external-snapshotter
5+ ADD . .
6+ ENV GOFLAGS="-buildvcs=false"
7+ RUN make build
8+
9+ FROM $BASE_IMAGE
10+ LABEL maintainers="Compute"
311LABEL description="Snapshot Controller"
412ARG binary=./bin/snapshot-controller
513
6- COPY ${binary} snapshot-controller
14+ COPY --from=builder /go/src/kubernetes-csi/external-snapshotter/ ${binary} snapshot-controller
715ENTRYPOINT ["/snapshot-controller" ]
You can’t perform that action at this time.
0 commit comments