mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 19:32:30 +01:00
34309cbbcd
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
34 lines
708 B
Docker
34 lines
708 B
Docker
FROM alpine:latest
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
ENV GOPATH /go
|
|
|
|
RUN apk --no-cache add \
|
|
ca-certificates
|
|
|
|
ENV OAUTH2_VERSION v2.2
|
|
|
|
RUN buildDeps=' \
|
|
go \
|
|
git \
|
|
gcc \
|
|
g++ \
|
|
libc-dev \
|
|
libgcc \
|
|
' \
|
|
set -x \
|
|
&& apk --no-cache add --repository https://dl-3.alpinelinux.org/alpine/edge/community $buildDeps \
|
|
&& go get github.com/bitly/oauth2_proxy \
|
|
&& cd /go/src/github.com/bitly/oauth2_proxy \
|
|
&& git checkout "${OAUTH2_VERSION}" \
|
|
&& go get -d github.com/bitly/oauth2_proxy \
|
|
&& go build \
|
|
&& mv oauth2_proxy /usr/bin/ \
|
|
&& apk del $buildDeps \
|
|
&& rm -rf /go \
|
|
&& echo "Build complete."
|
|
|
|
|
|
ENTRYPOINT [ "oauth2_proxy" ]
|