zokradonh/kopano-docker

use customized ldif file in ldap-demo

Closed this issue · 2 comments

Hello,

I've customized the ldif-file in ldap-demo, so I can deploy my system without any manual customizing.

To do that, I've changed the ldap-demo.ldif and build my own ldap-demo. After that I've customized the docker-compose file.

To ensure that the image exist I've wrote a start script:

#!/bin/bash
docker-compose down
docker-compose pull
docker image rm xtralarge/ldap_demo
docker volume prune -f
docker build -t xtralarge/ldap_demo:latest ldap_demo/
docker-compose up -d

This will work, but the pull command throws an error and it isn't very nice. It would be great to add an environment variable that could be used to setup an custom ldif file to the original container.

Hi @XtraLarge,

that sounds more complicated than it needs to be. The only thing that the _demo image does differently is including some demo data which will be imported on the first startup (this is done in

COPY bootstrap /container/service/slapd/assets/config/bootstrap
).

So instead of building your own container (with your own ldif) you could just use the normal ldap image and just mount your bootstrap file into the container at runtime.

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days