From a6d4609d3b7b1b5431539666135a3b9609ea53de Mon Sep 17 00:00:00 2001 From: Dedy Martadinata S Date: Mon, 11 Jul 2022 23:03:33 +0700 Subject: [PATCH] enabling UID:GID --- docker-entrypoint.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index e746dbf..ff7d30b 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -35,4 +35,13 @@ if [[ ! -r "$CONFIG_FILE" ]]; then exit 1; fi -exec /app/lldap "$@" +echo "> Setup permissions.." +find /app \! -user "$UID" -exec chown "$UID:$GID" '{}' + +find /data \! -user "$UID" -exec chown "$UID:$GID" '{}' + + + +echo "> Starting lldap.." +echo "" +exec gosu "$UID:$GID" /app/lldap "$@" + +exec "$@"