-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (28 loc) · 974 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
38
39
40
41
# FROM osixia/openldap:1.4.0
# EXPOSE 389
FROM centos:centos7
# File Author / Maintainer
LABEL maintainer="mvcrk <mvrck@el.ch>"
# Clean up yum repos to save spaces
RUN yum update -y >/dev/null
# Install epel repos
RUN rpm -Uvh https://download-ib01.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-12.noarch.rpm
# Installing epel
RUN yum -y install epel-release
# Install Openldap Server and Clients package
RUN yum install -y openldap-servers openldap-servers-sql openldap-clients openldap-devel gcc python-devel
COPY ./data/scripts /scripts
RUN /scripts/get-pip.py
RUN python -m pip install python-ldap==2.5.2
# Set Enviroment
ENV SLAPD_URL ldapi:/// ldap:///
# Adding the run file
ADD run.sh /usr/bin/run.sh
# Set file permission
RUN chmod 755 /usr/bin/run.sh
# Setup Volume (ldap datastore, ldap config)
VOLUME ["/var/lib/ldap", "/etc/openldap/"]
# Set the port to 389 for ldap server
EXPOSE 389
# Executing ldap server
CMD ["/usr/bin/run.sh"]