osixia / docker-openldap

OpenLDAP container image 🐳🌴
MIT License
4.02k stars 973 forks source link

Getting a Dockerfile #642

Open ZakaAb opened 1 year ago

ZakaAb commented 1 year ago

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

nix-power commented 1 year ago

what is the output of docker logs ?