mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-27 04:16:45 +01:00
e3b110208d
Signed-off-by: Jess Frazelle <acidburn@jessfraz.com>
29 lines
656 B
Docker
29 lines
656 B
Docker
FROM golang:alpine as builder
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
|
|
|
RUN apk --no-cache add \
|
|
ca-certificates \
|
|
git
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
ENV GOPATH /go
|
|
|
|
ENV OAUTH2_PROXY_VERSION v3.2.0
|
|
|
|
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}" \
|
|
&& dep ensure --vendor-only \
|
|
&& go build . \
|
|
&& mv oauth2_proxy /usr/bin/
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
COPY --from=builder /usr/bin/oauth2_proxy /usr/bin/oauth2_proxy
|
|
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
|
|
|
|
ENTRYPOINT [ "oauth2_proxy" ]
|