Dockerfile 837 B

12345678910111213141516171819202122232425262728293031323334
  1. FROM alpine:latest
  2. # The setup follows the OpenLDAP admin guide on
  3. # http://www.openldap.org/doc/admin24/guide.html
  4. # Define env variables
  5. ENV DOMAIN example
  6. ENV LDAPROOT dc=example,dc=org
  7. ENV ORGANIZATION Example Org.
  8. ENV DEBUG 1
  9. ENV USER ldap
  10. ENV GROUP ldap
  11. # Install OpenLDAP with MDB backend
  12. # openldap-clients is not really required, can be removed after evaluation.
  13. RUN apk add --update --no-cache \
  14. gettext \
  15. pwgen \
  16. openldap \
  17. openldap-clients \
  18. openldap-back-mdb
  19. RUN mkdir /run/openldap && \
  20. chown ${USER}:${GROUP} /run/openldap
  21. RUN echo "TLS_CACERT /etc/ssl/certs/ca_server.pem" >> /etc/openldap/ldap.conf
  22. COPY ./entrypoint.sh /entrypoint.sh
  23. CMD /entrypoint.sh
  24. EXPOSE 389
  25. VOLUME /etc/openldap/slapd.d /var/lib/openldap /var/backups /var/restore /var/ldifs /scripts