forked from rroemhild/docker-test-openldap
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
37 lines (28 loc) · 845 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM debian:7
MAINTAINER Rafael Römhild <[email protected]>
ENV DEBUG_LEVEL 256
ENV LDAP_DOMAIN planetexpress.com
ENV LDAP_ADMIN_SECRET GoodNewsEveryone
ENV LDAP_ORGANISATION Planet Express, Inc.
ENV DEBIAN_FRONTEND noninteractive
# Install slapd and requirements
RUN apt-get update \
&& apt-get -y --no-install-recommends install \
slapd \
ldap-utils \
openssl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Create TLS certificate and bootstrap directory
RUN mkdir /etc/ldap/ssl /bootstrap
# ADD run script
COPY ./run.sh /run.sh
# ADD bootstrap files
ADD ./bootstrap /bootstrap
# Initialize LDAP with data
RUN /bin/bash /bootstrap/slapd-init.sh
VOLUME ["/etc/ldap/slapd.d", "/etc/ldap/ssl", "/var/lib/ldap", "/run/slapd"]
EXPOSE 389
EXPOSE 636
CMD []
ENTRYPOINT ["/bin/bash", "/run.sh"]