osixia / docker-phpLDAPadmin

phpLDAPadmin container image 🐳🌴
MIT License
842 stars 196 forks source link

Add warning about anonymous volume #83

Closed cskwrd closed 1 year ago

cskwrd commented 3 years ago

The Dockerfile for the image uses an anonymous volume to persist the transformed config. This presents a problem in situations where a compose file is used. Volumes are not destroyed when changes are made to the compose file. This is in turn results in stale configuration. Additionally, it is rather difficult to debug when the configuration doesn't update as expected.

BertrandGouny commented 3 years ago

Thanks :)

maxswjeon commented 2 years ago

Please add warning to docker-compose users.

docker-compose Guide

When using docker-compose, docker-compose up -d --force-recreate does not reset anonymous volume. Run docker-compose stop [service name] and docker-compose rm [service name] and then you should run docker-compose up -d.

Oisins commented 2 years ago

To add to this: Is there a way to include custom templates (/var/www/phpldapadmin/templates...) by extending the Dockerfile? I tried to do this, but because of the VOLUME command in the Dockerfile, my COPY overwrites the existing /var/www directory.

Example:

FROM osixia/phpldapadmin:stable

COPY config.php /var/www/phpldapadmin/config/config.php
COPY posixAccount.xml /var/www/phpldapadmin/templates/creation/posixAccount.xml

Any Ideas would be appreciated.

EDIT: Nothing to do with docker. Issue was the install.sh script.

cskwrd commented 2 years ago

Is something more required for this to be merged?