File tree Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Expand file tree Collapse file tree 2 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 1- FROM golang:1.13-alpine
1+ FROM golang:1.13-alpine AS builder
22
33RUN apk update && apk add sqlite build-base git mercurial bash
44WORKDIR /build
@@ -12,8 +12,11 @@ RUN make static
1212RUN GRPC_HEALTH_PROBE_VERSION=v0.2.1 && \
1313 wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-$(go env GOARCH) && \
1414 chmod +x /bin/grpc_health_probe
15- RUN cp /build/bin/opm /bin/opm && \
16- cp /build/bin/initializer /bin/initializer && \
17- cp /build/bin/appregistry-server /bin/appregistry-server && \
18- cp /build/bin/configmap-server /bin/configmap-server && \
19- cp /build/bin/registry-server /bin/registry-server
15+
16+ FROM scratch
17+ COPY --from=builder /build/bin/opm /bin/opm
18+ COPY --from=builder /build/bin/initializer /bin/initializer
19+ COPY --from=builder /build/bin/appregistry-server /bin/appregistry-server
20+ COPY --from=builder /build/bin/configmap-server /bin/configmap-server
21+ COPY --from=builder /build/bin/registry-server /bin/registry-server
22+ COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
Original file line number Diff line number Diff line change 1+ FROM golang:1.13-alpine AS builder
2+
3+ RUN apk update && apk add sqlite build-base git mercurial bash
4+ WORKDIR /build
5+
6+ COPY vendor vendor
7+ COPY cmd cmd
8+ COPY pkg pkg
9+ COPY Makefile Makefile
10+ COPY go.mod go.mod
11+ RUN make static
12+ RUN GRPC_HEALTH_PROBE_VERSION=v0.2.1 && \
13+ wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-$(go env GOARCH) && \
14+ chmod +x /bin/grpc_health_probe
15+
16+ FROM scratch
17+ COPY --from=builder /build/bin/opm /bin/opm
18+ COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe
You can’t perform that action at this time.
0 commit comments