zokradonh / kopano-docker

Unofficial Kopano Docker images for all Kopano services.
MIT License
59 stars 36 forks source link

use customized ldif file in ldap-demo #460

Closed XtraLarge closed 3 years ago

XtraLarge commented 4 years ago

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.

fbartels commented 4 years ago

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 https://github.com/zokradonh/kopano-docker/blob/d3ef8b472a9a1645daab4fb3f57a699054167f65/ldap_demo/Dockerfile#L6).

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.

github-actions[bot] commented 3 years ago

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