define a WORKDIR

makes cache invalidation less likely
This commit is contained in:
Andrew Schleifer 2018-09-12 14:58:53 +08:00
parent e2d47b0eec
commit 3931d81e78
1 changed files with 2 additions and 3 deletions

View File

@ -1,9 +1,8 @@
FROM golang:alpine as builder
RUN apk add git
COPY main.go /go/src/github.com/discourse/discourse-auth-proxy/
RUN cd /go/src/github.com/discourse/discourse-auth-proxy \
&& go get \
&& go build
WORKDIR /go/src/github.com/discourse/discourse-auth-proxy
RUN go get && go build
FROM alpine:latest
COPY --from=builder /go/bin/discourse-auth-proxy /bin/