-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
40 lines (28 loc) · 992 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
############################################################
# Dockerfile to build CentOS, Openldap installed Container
# Based on CentOS6.6
############################################################
# Set the base image to CentOS
FROM centos:centos6
# File Author / Maintainer
MAINTAINER "Jash Lee" <[email protected]>
# Clean up yum repos to save spaces
RUN yum update -y >/dev/null
# Install epel repos
RUN rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# Installing epel
RUN yum -y install epel-release
# Install Openldap Server and Clients package
RUN yum install -y openldap-servers openldap-clients
# 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"]