chown TMP_DIR and LIB_DIR recursively inside docker_entrypoint to handle custom PUID

This commit is contained in:
Nick Sweeting 2024-10-23 23:28:11 -07:00
parent 082930b2ef
commit 63bf902f35
No known key found for this signature in database
2 changed files with 9 additions and 6 deletions

View file

@ -110,12 +110,15 @@ if [[ -d "$PLAYWRIGHT_BROWSERS_PATH/.links" ]]; then
chown -h $PUID:$PGID "$PLAYWRIGHT_BROWSERS_PATH"/.links/*
fi
# also create and chown tmp dir and lib dirs
mkdir -p "$DATA_DIR"/lib/bin
chown $PUID:$PGID "$DATA_DIR"/lib "$DATA_DIR"/lib/*
# also create and chown tmp dir and lib dir (and their default equivalents inside data/)
# mkdir -p "$DATA_DIR"/lib/bin
# chown $PUID:$PGID "$DATA_DIR"/lib "$DATA_DIR"/lib/*
chown $PUID:$PGID "$LIB_DIR" 2>/dev/null
chown $PUID:$PGID "$LIB_DIR/*" 2>/dev/null &
mkdir -p "$DATA_DIR"/tmp/workers
chown $PUID:$PGID "$DATA_DIR"/tmp "$DATA_DIR"/tmp/*
# mkdir -p "$DATA_DIR"/tmp/workers
# chown $PUID:$PGID "$DATA_DIR"/tmp "$DATA_DIR"/tmp/*
chown $PUID:$PGID "$TMP_DIR" 2>/dev/null
chown $PUID:$PGID "$TMP_DIR/*" 2>/dev/null &
# (this check is written in blood in 2023, QEMU silently breaks things in ways that are not obvious)