Dockerfile 849 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. FROM alpine
  2. MAINTAINER Tomi Cvetic <tomi@slurm.ch>
  3. # The setup follows the OpenLDAP admin guide on
  4. # http://www.openldap.org/doc/admin24/guide.html
  5. # Define env variables
  6. ENV DOMAIN ""
  7. ENV PASSWORD ""
  8. ENV DEBUG 1
  9. ENV SERVER_NAME ""
  10. # Default env variables
  11. ENV USER "ldap"
  12. ENV GROUP "$USER"
  13. # Install openldap with MDB backend
  14. RUN apk update --no-cache && apk upgrade --no-cache
  15. RUN apk add --no-cache \
  16. pwgen \
  17. openldap \
  18. openldap-clients \
  19. openldap-back-mdb
  20. RUN mkdir /run/openldap
  21. RUN chown $USER:$GROUP /run/openldap
  22. # Add schemas that are not initially in the installation
  23. ADD samba.schema /etc/openldap/schema/samba.schema
  24. # Add start script
  25. ADD start.sh /start.sh
  26. CMD ["/start.sh"]
  27. EXPOSE 389
  28. EXPOSE 636
  29. VOLUME /etc/ldap
  30. VOLUME /var/backups
  31. VOLUME /var/restore
  32. VOLUME /var/lib/ldap