openldap/Containerfile.multiarch

43 lines
1.4 KiB
Plaintext
Raw Normal View History

FROM docker.io/alpine:3.20@sha256:1e42bbe2508154c9126d48c2b8a75420c3544343bf86fd041fb7527e017a4b4a
2024-07-06 10:25:56 +00:00
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
LABEL org.opencontainers.image.title="openldap"
LABEL org.opencontainers.image.url="https://gitea.rknet.org/container/openldap"
LABEL org.opencontainers.image.source="https://gitea.rknet.org/container/openldap"
LABEL org.opencontainers.image.documentation="https://gitea.rknet.org/container/openldap"
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
# renovate: datasource=repology depName=alpine_3_20/openldap versioning=loose
ENV OPENLDAP_VERSION=2.6.8-r0
2024-07-06 10:25:56 +00:00
RUN addgroup -g 1001 -S ldap && \
2024-10-26 19:46:33 +00:00
adduser -S -D -H -u 1001 -h /openldap -G ldap -g ldap ldap && \
2024-07-06 10:25:56 +00:00
apk --update add --virtual .build-deps curl && \
apk --update --no-cache add openldap \
openldap-back-ldap \
openldap-back-mdb \
openldap-overlay-rwm \
openldap-overlay-memberof \
openldap-clients && \
2024-07-06 12:14:14 +00:00
mkdir -p /openldap/conf /openldap/data && \
2024-07-06 12:00:41 +00:00
cp /etc/openldap/slapd.conf /openldap/conf/slapd.conf && \
chown -R ldap:ldap /openldap && \
2024-07-06 10:25:56 +00:00
apk del .build-deps && \
rm -rf /var/cache/apk/* && \
rm -rf /tmp/*
2024-07-06 12:00:41 +00:00
ADD overlay/ /
2024-07-06 10:25:56 +00:00
EXPOSE 389 636
USER 1001
STOPSIGNAL SIGTERM
2024-07-06 12:00:41 +00:00
WORKDIR /openldap
2024-07-07 09:57:26 +00:00
CMD ["/usr/sbin/slapd", "-d", "stats", "-u", "ldap", "-g", "ldap", "-f", "/openldap/conf/slapd.conf", "-h", "ldaps:// ldap://"]