2020-05-15 10:46:43 +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
|
|
|
|
|
2020-05-15 08:13:42 +02:00
|
|
|
ENV OAUTH2_PROXY_VERSION v5.1.1
|
2019-03-08 17:29:49 +01:00
|
|
|
|
|
|
|
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" ]
|