From 16796a63fd7a814dd7acaad08f6317f68d2e6f1a Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Fri, 20 Oct 2023 02:45:54 -0700 Subject: [PATCH] share PUID and PGID with child procs from entrypoint --- bin/docker_entrypoint.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/docker_entrypoint.sh b/bin/docker_entrypoint.sh index 71abc2bc..b245968f 100755 --- a/bin/docker_entrypoint.sh +++ b/bin/docker_entrypoint.sh @@ -12,8 +12,8 @@ if [[ -n "$PGID" && "$PGID" != 0 ]]; then groupmod -g "$PGID" "$ARCHIVEBOX_USER" > /dev/null 2>&1 fi -PUID="$(id -u archivebox)" -PGID="$(id -g archivebox)" +export PUID="$(id -u archivebox)" +export PGID="$(id -g archivebox)" # Check the permissions of the data dir (or create if it doesn't exist) if [[ -d "$DATA_DIR/archive" ]]; then @@ -33,7 +33,6 @@ else fi chown $ARCHIVEBOX_USER:$ARCHIVEBOX_USER "$DATA_DIR" "$DATA_DIR"/* - # Drop permissions to run commands as the archivebox user if [[ "$1" == /* || "$1" == "echo" || "$1" == "archivebox" ]]; then # arg 1 is a binary, execute it verbatim