From 35685cf6ea44703872fffce0611e3dd5a851c5f7 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sun, 17 Dec 2023 16:06:02 -0800 Subject: [PATCH] mkdir and chown browsers directory automatically in entrypoint script --- bin/docker_entrypoint.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/docker_entrypoint.sh b/bin/docker_entrypoint.sh index 9b055fc4..2d8035e2 100755 --- a/bin/docker_entrypoint.sh +++ b/bin/docker_entrypoint.sh @@ -71,10 +71,11 @@ fi chown $PUID:$PGID "$DATA_DIR" chown $PUID:$PGID "$DATA_DIR"/* -# also chown BROWSERS_DIR because otherwise 'archivebox setup' wont be able to install chrome +# also chown BROWSERS_DIR because otherwise 'archivebox setup' wont be able to install chrome at runtime PLAYWRIGHT_BROWSERS_PATH="${PLAYWRIGHT_BROWSERS_PATH:-/browsers}" +mkdir -p "$PLAYWRIGHT_BROWSERS_PATH" chown $PUID:$PGID "$PLAYWRIGHT_BROWSERS_PATH" -chown $PUID:$PGID "${PLAYWRIGHT_BROWSERS_PATH}/*" +chown $PUID:$PGID "$PLAYWRIGHT_BROWSERS_PATH"/* # (this check is written in blood, QEMU silently breaks things in ways that are not obvious) export IN_QEMU="$(pmap 1 | grep qemu | wc -l | grep -E '^0$' >/dev/null && echo 'False' || echo 'True')"