I want to have a LDAP server on a docker container, I already used dinkel/openldap, osixia/openldap and muzili/ldap docker images and so far connection and first configuration is ok.
My problem is: although I mounted container's /var/lib/ldap & /etc/ldap, there is always a backup needed before stoping, killing or removing(safe removing, docker rm without -v) the ldap container or there would be data loss. And it doesn't seem to go through all config files because it also need a data import at start.
I think I may going through some problem with docker container and their volume mounting but every else container mounting is a success and it only seem to have a problem with ldap containers.
Is there any solution to make it work?(config at startup by reading from mounted folders and not losing data?)