forked from mintel/dex-k8s-authenticator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
41 lines (27 loc) · 974 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM golang:alpine
RUN apk add --no-cache --update alpine-sdk bash
WORKDIR /app
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN make build
FROM alpine:latest
# Dex connectors, such as GitHub and Google logins require root certificates.
# Proper installations should manage those certificates, but it's a bad user
# experience when this doesn't work out of the box.
#
# OpenSSL is required so wget can query HTTPS endpoints for health checking.
RUN apk add --update --upgrade ca-certificates openssl curl tini
RUN mkdir -p /app/bin
COPY --from=0 /app/bin/dex-k8s-authenticator /app/bin/
COPY --from=0 /app/html /app/html
COPY --from=0 /app/templates /app/templates
# Add any required certs/key by mounting a volume on /certs
# The entrypoint will copy them and run update-ca-certificates at startup
RUN mkdir -p /certs
WORKDIR /app
COPY entrypoint.sh /
RUN chmod a+x /entrypoint.sh
ENTRYPOINT ["/sbin/tini", "--", "/entrypoint.sh"]
CMD ["--help"]