docker-openldap icon indicating copy to clipboard operation
docker-openldap copied to clipboard

Getting a Dockerfile

Open ZakaAb opened this issue 3 years ago • 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

ZakaAb avatar Oct 27 '22 19:10 ZakaAb

what is the output of docker logs ?

nix-power avatar Mar 06 '23 13:03 nix-power