-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (39 loc) · 1.56 KB
/
Dockerfile
File metadata and controls
50 lines (39 loc) · 1.56 KB
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
ARG DOGU_BASE_IMAGE=registry.cloudogu.com/official/base:3.23.3-5
ARG ALPINE_BASE_IMAGE=alpine:3.23
ARG OPENLDAP_PKG_VER=2.6.10-r0
FROM scratch AS ldap-resources
COPY ./resources /
COPY ./dogu.json /dogu.json
FROM ${DOGU_BASE_IMAGE} AS dogu-base
FROM ${ALPINE_BASE_IMAGE} AS ldap-common
ARG OPENLDAP_PKG_VER
RUN set -eux -o pipefail \
&& apk update \
&& apk upgrade \
&& apk add --update openldap=${OPENLDAP_PKG_VER} openldap-clients openldap-back-mdb \
openldap-overlay-memberof openldap-overlay-refint openldap-overlay-unique \
openldap-overlay-ppolicy \
openldap-overlay-sssvlv \
ca-certificates jq openssl tar zip unzip mailx ssmtp \
supercronic \
bash \
su-exec \
&& rm -rf /var/cache/apk/*
# Set UTC as default timezone to ensure consistent behavior across environments.
ENV TZ=UTC
EXPOSE 389
COPY --from=ldap-resources / /
COPY --from=dogu-base /usr/local/bin/doguctl /usr/local/bin/doguctl
RUN set -eux -o pipefail \
&& chmod 0755 /startup.sh /usr/local/bin/doguctl /component/init-persistence-layout.sh /component/reconcile-service-accounts.sh \
&& chown -R 100:101 /srv/openldap/ldif.d \
&& chmod -R ug+rwX /srv/openldap/ldif.d
FROM ldap-common AS dogu
LABEL NAME="official/ldap" \
VERSION="2.6.10-4" \
maintainer="hello@cloudogu.com"
RUN set -eux -o pipefail \
&& chmod 0755 /srv/openldap/create-sa.sh
HEALTHCHECK CMD doguctl healthy ldap || exit 1
# FIRE IT UP
CMD ["/startup.sh"]