-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #298 from kevinrizza/bug-1820438
Bug 1820438: Slim down upstream builder
- Loading branch information
Showing
2 changed files
with
27 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM golang:1.13-alpine AS builder | ||
|
||
RUN apk update && apk add sqlite build-base git mercurial bash | ||
WORKDIR /build | ||
|
||
COPY vendor vendor | ||
COPY cmd cmd | ||
COPY pkg pkg | ||
COPY Makefile Makefile | ||
COPY go.mod go.mod | ||
RUN make static | ||
RUN GRPC_HEALTH_PROBE_VERSION=v0.2.1 && \ | ||
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) && \ | ||
chmod +x /bin/grpc_health_probe | ||
|
||
FROM scratch | ||
COPY --from=builder /build/bin/opm /bin/opm | ||
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe |