Reduce docker context to improve build times

This commit is contained in:
Joel Speed
2020-07-07 20:51:43 +01:00
parent a999270cf3
commit 7ffe9b7620
6 changed files with 22 additions and 12 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
FROM golang:1.14-buster AS builder
ARG VERSION
# Download tools
RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0
@@ -19,7 +20,7 @@ COPY . .
# build the key into the container and then tell it where it is
# by setting OAUTH2_PROXY_JWT_KEY_FILE=/etc/ssl/private/jwt_signing_key.pem
# in app.yaml instead.
RUN make build && touch jwt_signing_key.pem
RUN VERSION=${VERSION} make build && touch jwt_signing_key.pem
# Copy binary to alpine
FROM alpine:3.11