forked from ome/apacheds-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
69 lines (56 loc) · 2.11 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
FROM tozd/runit:ubuntu-xenial
MAINTAINER [email protected]
#############################################
# ApacheDS installation
#############################################
ENV APACHEDS_VERSION 2.0.0.AM25
ENV APACHEDS_ARCH amd64
ENV APACHEDS_ARCHIVE apacheds-${APACHEDS_VERSION}-${APACHEDS_ARCH}.deb
ENV APACHEDS_DATA /var/lib/apacheds
ENV APACHEDS_USER apacheds
ENV APACHEDS_GROUP apacheds
RUN ln -s ${APACHEDS_DATA}-${APACHEDS_VERSION} ${APACHEDS_DATA}
VOLUME ${APACHEDS_DATA}
# VOLUME /var/log/apacheds
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
&& apt-get update \
&& apt-get install -y \
apt-utils \
ldap-utils \
procps \
openjdk-8-jre-headless \
curl \
jq \
&& curl http://www.eu.apache.org/dist//directory/apacheds/dist/${APACHEDS_VERSION}/${APACHEDS_ARCHIVE} > ${APACHEDS_ARCHIVE} \
&& dpkg -i ${APACHEDS_ARCHIVE} \
&& rm ${APACHEDS_ARCHIVE}
# Ports defined by the default instance configuration:
# 10389: ldap
# 10636: ldaps
# 60088: kerberos
# 60464: changePasswordServer
# 8080: http
# 8443: https
EXPOSE 10389 10636 60088 60464 8080 8443
#############################################
# ApacheDS bootstrap configuration
#############################################
ENV APACHEDS_INSTANCE default
ENV APACHEDS_BOOTSTRAP /bootstrap
COPY ./etc /etc
# RUN chown ${APACHEDS_USER}:${APACHEDS_GROUP} /run.sh \
# && chmod u+rx /run.sh
COPY instance/* ${APACHEDS_BOOTSTRAP}/conf/
COPY ome.ldif ${APACHEDS_BOOTSTRAP}/
RUN mkdir ${APACHEDS_BOOTSTRAP}/cache \
&& mkdir ${APACHEDS_BOOTSTRAP}/run \
&& mkdir ${APACHEDS_BOOTSTRAP}/log \
&& mkdir ${APACHEDS_BOOTSTRAP}/partitions \
&& chown -R ${APACHEDS_USER}:${APACHEDS_GROUP} ${APACHEDS_BOOTSTRAP}
RUN apt-get install -y python-ldap
COPY bin/ldapmanager /usr/local/bin/ldapmanager
#############################################
# ApacheDS wrapper command
#############################################
# Correct for hard-coded INSTANCES_DIRECTORY variable
RUN sed -i "s#/var/lib/apacheds-${APACHEDS_VERSION}#/var/lib/apacheds#" /opt/apacheds-${APACHEDS_VERSION}/bin/apacheds