1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2024-11-24 08:52:25 +02:00
oauth2-proxy/Dockerfile

23 lines
559 B
Docker
Raw Normal View History

2019-01-15 17:57:53 +02:00
FROM golang:1.11-stretch AS builder
# Download tools
RUN wget -O $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64
RUN chmod +x $GOPATH/bin/dep
# Copy sources
WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy
2018-12-20 13:06:26 +02:00
COPY . .
# Fetch dependencies
RUN dep ensure --vendor-only
# Build binary
RUN ./configure && make build
2018-12-20 13:06:26 +02:00
# Copy binary to alpine
FROM alpine:3.8
RUN apk add --no-cache ca-certificates
2018-12-20 13:06:26 +02:00
COPY --from=builder /go/src/github.com/pusher/oauth2_proxy/oauth2_proxy /bin/oauth2_proxy
ENTRYPOINT ["/bin/oauth2_proxy"]