git.iko.soy/typeable/oauth2-proxy
on atlassian-provider help sign in
typeable/oauth2-proxy/Dockerfile.armv6
31 lines 1.1 kB history raw
1FROM golang:1.15-buster AS builder
2ARG VERSION
4# Copy sources
5WORKDIR $GOPATH/src/github.com/oauth2-proxy/oauth2-proxy
7# Fetch dependencies
8COPY go.mod go.sum ./
9RUN GO111MODULE=on go mod download
11# Now pull in our code
12COPY . .
14# Build binary and make sure there is at least an empty key file.
15# This is useful for GCP App Engine custom runtime builds, because
16# you cannot use multiline variables in their app.yaml, so you have to
17# build the key into the container and then tell it where it is
18# by setting OAUTH2_PROXY_JWT_KEY_FILE=/etc/ssl/private/jwt_signing_key.pem
19# in app.yaml instead.
20RUN VERSION=${VERSION} GOARCH=arm GOARM=6 make build && touch jwt_signing_key.pem
22# Copy binary to alpine
23FROM arm32v6/alpine:3.13
24COPY nsswitch.conf /etc/nsswitch.conf
25COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
26COPY --from=builder /go/src/github.com/oauth2-proxy/oauth2-proxy/oauth2-proxy /bin/oauth2-proxy
27COPY --from=builder /go/src/github.com/oauth2-proxy/oauth2-proxy/jwt_signing_key.pem /etc/ssl/private/jwt_signing_key.pem
29USER 2000:2000
31ENTRYPOINT ["/bin/oauth2-proxy"]