openldap (init)
Published 2026-03-30 19:45:57 +10:00 by j
Installation
docker pull repobase.net/dxcker/openldap:initsha256:f9e47b166f51a1d348dab713e59f182f187a9754bc9f1eb219aace23c7285253Image layers
| # debian.sh --arch 'amd64' out/ 'trixie' '@1766966400' |
| ENV DEBIAN_FRONTEND=noninteractive |
| ENV APP_UID=1000 |
| ENV APP_GID=1000 |
| ENV CONFIG_DIR=/config |
| ENV DATA_DIR=/data |
| RUN /bin/sh -c apt update && apt -y upgrade && apt -y install curl tini ca-certificates ssl-cert && apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # buildkit |
| RUN /bin/sh -c groupadd -g ${APP_UID} app && useradd -u ${APP_GID} -g app app # buildkit |
| RUN /bin/sh -c usermod -a -G ssl-cert app # buildkit |
| RUN /bin/sh -c mkdir -p $CONFIG_DIR $DATA_DIR # buildkit |
| RUN /bin/sh -c chown -R app:app $CONFIG_DIR $DATA_DIR # buildkit |
| RUN /bin/sh -c chmod 755 $CONFIG_DIR $DATA_DIR # buildkit |
| COPY files/scripts/common.rc /common.rc # buildkit |
| RUN /bin/sh -c chown app:app /common.rc && chmod +x /common.rc # buildkit |
| COPY files/scripts/entrypoint.sh /entrypoint.sh # buildkit |
| RUN /bin/sh -c chown app:app /entrypoint.sh && chmod +x /entrypoint.sh # buildkit |
| ENTRYPOINT ["/entrypoint.sh"] |
| CMD ["--" "sleep" "infinity"] |
| ENV DEBIAN_FRONTEND=noninteractive |
| ENV APP_UID=1000 |
| ENV APP_GID=1000 |
| ENV CONFIG_DIR=/config |
| ENV DATA_DIR=/data |
| ENV LDAP_DOMAIN=example.com |
| ENV LDAP_ORGANISATION=Example Organization |
| ENV LDAP_ADMIN_PASSWORD=admin |
| ENV LDAP_CONFIG_PASSWORD=config |
| RUN /bin/sh -c echo "slapd slapd/no_configuration boolean true" | debconf-set-selections # buildkit |
| RUN /bin/sh -c apt update && apt -y upgrade && apt -y install slapd ldap-utils gettext-base && apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # buildkit |
| COPY files/ldif/ /ldif/ # buildkit |
| COPY files/scripts/common.rc /common.rc # buildkit |
| RUN /bin/sh -c chown app:app /common.rc && chmod +x /common.rc # buildkit |
| COPY files/scripts/entrypoint.sh /entrypoint.sh # buildkit |
| RUN /bin/sh -c chown app:app /entrypoint.sh && chmod +x /entrypoint.sh # buildkit |
| EXPOSE [389/tcp 636/tcp] |
| VOLUME [/config /data] |
| ENTRYPOINT ["/entrypoint.sh"] |