12345678910111213141516171819202122232425262728293031323334 |
- FROM alpine:latest
- # The setup follows the OpenLDAP admin guide on
- # http://www.openldap.org/doc/admin24/guide.html
- # Define env variables
- ENV DOMAIN example
- ENV LDAPROOT dc=example,dc=org
- ENV ORGANIZATION Example Org.
- ENV DEBUG 1
- ENV USER ldap
- ENV GROUP ldap
- # Install OpenLDAP with MDB backend
- # openldap-clients is not really required, can be removed after evaluation.
- RUN apk add --update --no-cache \
- gettext \
- pwgen \
- openldap \
- openldap-clients \
- openldap-back-mdb
- RUN mkdir /run/openldap && \
- chown ${USER}:${GROUP} /run/openldap
- RUN echo "TLS_CACERT /etc/ssl/certs/ca_server.pem" >> /etc/openldap/ldap.conf
- COPY ./entrypoint.sh /entrypoint.sh
- CMD /entrypoint.sh
- EXPOSE 389
- VOLUME /etc/openldap/slapd.d /var/lib/openldap /var/backups /var/restore /var/ldifs /scripts
|