mirror of
https://github.com/lldap/lldap.git
synced 2026-07-25 17:58:44 +00:00
docker: Fix permission issues, remove user from container
This commit is contained in:
committed by
nitnelave
parent
9653d64eb1
commit
6191fb226a
@@ -15,4 +15,24 @@ for SECRET in LLDAP_JWT_SECRET LLDAP_LDAP_USER_PASS; do
|
||||
fi
|
||||
done
|
||||
|
||||
CONFIG_FILE=/data/lldap_config.toml
|
||||
|
||||
if [[ ( ! -w "/data" ) ]] || [[ ( ! -d "/data" ) ]]; then
|
||||
echo "[entrypoint] The /data folder doesn't exist or cannot be written to. Make sure to mount
|
||||
a volume or folder to /data to persist data across restarts, and that the current user can
|
||||
write to it."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f "$CONFIG_FILE" ]]; then
|
||||
echo "[entrypoint] Copying the default config to $CONFIG_FILE"
|
||||
echo "[entrypoint] Edit this file to configure LLDAP."
|
||||
cp /app/lldap_config.docker_template.toml $CONFIG_FILE
|
||||
fi
|
||||
|
||||
if [[ ! -r "$CONFIG_FILE" ]]; then
|
||||
echo "[entrypoint] Config file is not readable. Check the permissions"
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
exec /app/lldap "$@"
|
||||
|
||||
Reference in New Issue
Block a user