diff --git a/openldap/DB_CONFIG b/openldap/DB_CONFIG new file mode 100644 index 0000000..fa22d63 --- /dev/null +++ b/openldap/DB_CONFIG @@ -0,0 +1,11 @@ +# Data & Logs Location +set_data_dir data +set_lg_dir logs + +# Cache size +set_cachesize 0 268435456 1 + +# Transaction Log settings +set_lg_regionmax 262144 +set_lg_bsize 2097152 + diff --git a/openldap/Dockerfile b/openldap/Dockerfile index e16e3d0..687178a 100644 --- a/openldap/Dockerfile +++ b/openldap/Dockerfile @@ -1,14 +1,15 @@ FROM centos:7 +ADD DB_CONFIG /var/lib/ldap/DB_CONFIG RUN yum update -y \ && yum -y install openldap-servers openldap-clients \ && yum clean all \ && rm -rf /var/cache/yum \ - && cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG \ + && mkdir -p /var/lib/ldap/logs /var/lib/data/data \ && chmod -R ugo+rw,+X /var/lib/ldap /var/run/openldap \ && chmod -R ugo+r,+X /etc/openldap -VOLUME /var/lib/ldap +VOLUME /var/lib/ldap/logs /var/lib/ldap/data WORKDIR /var/lib/ldap EXPOSE 1389