diff --git a/bin/docker_entrypoint.sh b/bin/docker_entrypoint.sh index 70699b2a..d2509cc9 100755 --- a/bin/docker_entrypoint.sh +++ b/bin/docker_entrypoint.sh @@ -75,7 +75,8 @@ PLAYWRIGHT_BROWSERS_PATH="${PLAYWRIGHT_BROWSERS_PATH:-/browsers}" mkdir -p "$PLAYWRIGHT_BROWSERS_PATH" chown $PUID:$PGID "$PLAYWRIGHT_BROWSERS_PATH" touch "$PLAYWRIGHT_BROWSERS_PATH"/.permissions_test_safe_to_delete -chown $PUID:$PGID "$PLAYWRIGHT_BROWSERS_PATH"/* +chown $PUID:$PGID "$PLAYWRIGHT_BROWSERS_PATH"/*.* +rm -f "$PLAYWRIGHT_BROWSERS_PATH"/.permissions_test_safe_to_delete # (this check is written in blood, QEMU silently breaks things in ways that are not obvious) @@ -86,6 +87,7 @@ if [[ "$IN_QEMU" == 'True' ]]; then echo -e " See here for more info: https://github.com/microsoft/playwright/issues/17395#issuecomment-1250830493\n" >&2 fi + # Drop permissions to run commands as the archivebox user if [[ "$1" == /* || "$1" == "bash" || "$1" == "sh" || "$1" == "echo" || "$1" == "cat" || "$1" == "archivebox" ]]; then # handle "docker run archivebox /some/non-archivebox/command --with=some args" by passing args directly to bash -c