osixia/docker-openldap

Getting a Dockerfile

ZakaAb opened this issue · 1 comments

Hello;
I want to build a custom openldap docker image from centos image, but slapd service keep exiting and the container shutdown immediately.
Look at my Dockerfile

`FROM centos:centos7.9.2009

RUN yum install openldap* -y

RUN rm -rf /etc/openldap/slapd.d/*

RUN cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG

RUN chown ldap:ldap /var/lib/ldap/*

WORKDIR /root

COPY ldap-* .

RUN slapadd -F /etc/openldap/slapd.d/ -n 0 -l ldap-config-18-02-2022.ldif

RUN slapadd -F /etc/openldap/slapd.d/ -n 2 -l ldap-data-18-02-2022.ldif

RUN chown -R ldap: /var/lib/ldap

RUN chown -R ldap: /etc/openldap/slapd.d

COPY server* .

RUN cp -p server* /etc/openldap/certs/

RUN chown -R ldap: /etc/openldap/certs/server.*
ENTRYPOINT /usr/sbin/slapd`
I will be grateful if some one can help

what is the output of docker logs ?