-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
62 lines (48 loc) · 1.5 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM dexidp/dex:v2.35.3
LABEL org.opencontainers.image.title="dns3l auth"
LABEL org.opencontainers.image.description="An OIDC provider for DNS3L"
LABEL org.opencontainers.image.version=1.0.5
ENV VERSION=1.0.5
ENV PAGER=less
ARG http_proxy
ARG https_proxy
ARG no_proxy
# provided via BuildKit
ARG TARGETPLATFORM
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
# defaults for none BuildKit
ENV _platform=${TARGETPLATFORM:-linux/amd64}
ENV _os=${TARGETOS:-linux}
ENV _arch=${TARGETARCH:-amd64}
ENV _variant=${TARGETVARIANT:-}
ENV DEXPATH="/home/dex"
ENV DEX_FRONTEND_DIR="/srv/dex/web"
ENV DEX="/srv/dex"
ARG DEXUID=10042
ARG DEXGID=10042
USER root
RUN apk --update upgrade && \
apk add --no-cache \
ca-certificates curl less bash busybox-extras \
joe tzdata coreutils openssl \
apache2-utils uuidgen && \
addgroup -g ${DEXGID} dex && \
adduser -D -u ${DEXUID} -G dex dex && \
chmod g-s ${DEXPATH} && \
chown dex:dex ${DEXPATH} && \
rm -rf /var/cache/apk/*
# Install dockerize
#
ENV DCKRZ_VERSION="0.16.3"
RUN _arch=${_arch/amd64/x86_64} && curl -fsSL https://github.com/powerman/dockerize/releases/download/v$DCKRZ_VERSION/dockerize-${_os}-${_arch}${_variant} > /dckrz && \
chmod a+x /dckrz
COPY --chown=dex:dex web/ ${DEXPATH}
COPY --chown=root:root config.docker.yaml /etc/dex/config.yaml.tmpl
COPY --chown=root:root docker-entrypoint.sh /entrypoint.sh
USER dex
WORKDIR $DEXPATH
EXPOSE 5556
ENTRYPOINT ["/entrypoint.sh"]
CMD ["dex", "serve", "/home/dex/config.yaml"]