Open frafra opened 5 months ago
To anyone with same issue: you can fix this by directly running slapd: /usr/sbin/slapd -h "ldapi:/// ldap://0.0.0.0:10389 ldaps://0.0.0.0:10636" -d 256
I am having the same issue. I wanted to add additional attributes to the users and therefore mount
volumes:
- ${DATADIR}/ldap/opt/openldap/bootstrap/data:/opt/openldap/bootstrap/data
Now I am getting the database already in use
loop. I have also tried to build a local image and removing the VOLUME
declaration in the Dockerfile
[1]. But that didn't work either. Any hints?
I don’t know how to configure the LDAP server correctly, but this hack helped:
rootfs/etc/services.d/slapd/run
#!/usr/bin/with-contenv bash
echo "starting slapd"
/usr/sbin/slapd -h "ldapi:/// ldap://0.0.0.0:10389 ldaps://0.0.0.0:10636" -d 256 -u openldap -g openldap
echo "Removing lock file..."
rm /var/lib/ldap/alock
I would advise against using
VOLUMES
inDockerfile
, as not all users are interested in having persistency on these paths, and it looks like it is not possible to just ignore them. Without the volumes the error would not happen.