Dockerfile 853 B

123456789101112131415161718192021222324252627282930313233
  1. FROM phusion/baseimage:0.9.8
  2. MAINTAINER Nick Stenning <nick@whiteink.com>
  3. ENV HOME /root
  4. # Disable SSH
  5. RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh
  6. # Use baseimage-docker's init system.
  7. CMD ["/sbin/my_init"]
  8. # Configure apt
  9. RUN echo 'deb http://us.archive.ubuntu.com/ubuntu/ precise universe' >> /etc/apt/sources.list
  10. RUN apt-get -y update
  11. # Install slapd
  12. RUN LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y slapd
  13. # Default configuration: can be overridden at the docker command line
  14. ENV LDAP_ROOTPASS toor
  15. ENV LDAP_ORG Acme Widgets Inc.
  16. ENV LDAP_DOMAIN example.com
  17. EXPOSE 389
  18. RUN mkdir /etc/service/slapd
  19. ADD slapd.sh /etc/service/slapd/run
  20. # To store the data outside the container, mount /var/lib/ldap as a data volume
  21. RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  22. # vim:ts=8:noet: