LemonLDAPNG / lemonldap-ng-docker

Dockerize LemonLDAP::NG
GNU General Public License v2.0
51 stars 31 forks source link

cannot save/reload config from docker image #42

Open Trophime opened 2 years ago

Trophime commented 2 years ago

Hi, I'm having trouble keeping config setup from docker image I've tried:

docker run -d -p 80:80 -e SSODOMAIN=grenoble.lncmi.local -e LOGLEVEL=debug -v $PWD/lemonldap-data-etc:/etc/lemonldap-ng -v $PWD/lemonldap-data-var:/var/lib/lemonldap-ng coudot/lemonldap-ng with empty data dir. the container fails to start:

docker logs magical_cartwright 
Starting periodic command scheduler: cron.
Starting anac(h)ronistic cron: anacron.
sed: can't read /etc/lemonldap-ng/*: No such file or directory
sed: can't read /etc/lemonldap-ng/lemonldap-ng.ini: No such file or directory
grep: /etc/lemonldap-ng/lemonldap-ng.ini: No such file or directory
sed: can't read /etc/lemonldap-ng/lemonldap-ng.ini: No such file or directory
sed: can't read /etc/lemonldap-ng/lemonldap-ng.ini: No such file or directory
2022/04/04 09:56:56 [emerg] 31#31: open() "/etc/nginx/sites-enabled/handler-nginx.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:60
nginx: [emerg] open() "/etc/nginx/sites-enabled/handler-nginx.conf" failed (2: No such file or directory) in /etc/nginx/nginx.conf:60

Next I saved manually the config by copying /etcLemonldap and /var/lib/lemondldap from the contaienr to the host . Running the same docker command, once again the container fails to stat properly:

Starting periodic command scheduler: cron.
Starting anac(h)ronistic cron: anacron.
FastCGI: manager (pid 29): initialized
FastCGI: manager (pid 29): server (pid 39) started
FastCGI: server (pid 39): initialized
FastCGI: manager (pid 29): server (pid 40) started
FastCGI: server (pid 40): initialized
FastCGI: manager (pid 29): server (pid 41) started
FastCGI: server (pid 41): initialized
FastCGI: manager (pid 29): server (pid 42) started
FastCGI: server (pid 42): initialized
FastCGI: manager (pid 29): server (pid 43) started
FastCGI: server (pid 43): initialized
FastCGI: manager (pid 29): server (pid 44) started
FastCGI: server (pid 44): initialized
FastCGI: manager (pid 29): server (pid 45) started
FastCGI: server (pid 45): initialized
2022/04/04 10:12:37 [error] 31#31: *1 FastCGI sent in stderr: "Unable to load /usr/share/lemonldap-ng/manager/htdocs/manager.psgi at /usr/sbin/llng-fastcgi-server line 96" while reading response header from upstream, client: 172.17.0.1, server: manager.grenoble.lncmi.local, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/llng-fastcgi-server/llng-fastcgi.sock:", host: "manager.grenoble.lncmi.local"
172.17.0.1 - - [04/Apr/2022:10:12:37 +0000] "GET / HTTP/1.1" 500 21 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0"

This is really annoying

guimard commented 2 years ago

Hi,

you choose to have your own /etc/lemonldap-ng and /var/lib/lemonldap-ng/conf directories. Maybe you should populate them

Cheers, Yadd