2018-09-14 21:35:18 +02:00
|
|
|
FROM golang:alpine as builder
|
2017-03-22 20:29:18 +01:00
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
|
|
|
|
2018-09-14 21:35:18 +02:00
|
|
|
RUN apk --no-cache add \
|
|
|
|
ca-certificates \
|
|
|
|
git
|
|
|
|
|
2017-03-22 20:29:18 +01:00
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
2019-08-31 02:52:57 +02:00
|
|
|
ENV OAUTH2_PROXY_VERSION v4.0.0
|
2019-03-08 17:29:49 +01:00
|
|
|
|
|
|
|
RUN go get github.com/golang/dep/cmd/dep
|
|
|
|
|
|
|
|
RUN go get github.com/pusher/oauth2_proxy || true \
|
|
|
|
&& cd /go/src/github.com/pusher/oauth2_proxy \
|
|
|
|
&& git checkout "${OAUTH2_PROXY_VERSION}" \
|
|
|
|
&& go build . \
|
2018-09-14 21:35:18 +02:00
|
|
|
&& mv oauth2_proxy /usr/bin/
|
|
|
|
|
|
|
|
|
|
|
|
FROM alpine:latest
|
2017-03-22 20:29:18 +01:00
|
|
|
|
2018-09-14 21:35:18 +02:00
|
|
|
COPY --from=builder /usr/bin/oauth2_proxy /usr/bin/oauth2_proxy
|
|
|
|
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
|
2017-03-22 20:29:18 +01:00
|
|
|
|
|
|
|
ENTRYPOINT [ "oauth2_proxy" ]
|