From 7a9460f45b99a60561159641c16d4a4f4028cbe1 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sat, 5 Oct 2024 04:17:58 -0700 Subject: [PATCH] try to ensure tmp is writable by archivebox user --- Dockerfile | 3 ++- bin/docker_entrypoint.sh | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8d1513e2..dafb8845 100644 --- a/Dockerfile +++ b/Dockerfile @@ -284,7 +284,8 @@ RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked,id=pip-$TARGETARCH # Setup ArchiveBox runtime config WORKDIR "$DATA_DIR" -RUN openssl rand -hex 16 > /etc/machine-id +RUN openssl rand -hex 16 > /etc/machine-id \ + && chown -R "$DEFAULT_PUID:$DEFAULT_PGID" "/tmp" ENV IN_DOCKER=True \ SYSTEM_LIB_DIR=/app/lib \ SYSTEM_TMP_DIR=/tmp \ diff --git a/bin/docker_entrypoint.sh b/bin/docker_entrypoint.sh index cb461916..2aa0b0d1 100755 --- a/bin/docker_entrypoint.sh +++ b/bin/docker_entrypoint.sh @@ -110,6 +110,10 @@ if [[ -d "$PLAYWRIGHT_BROWSERS_PATH/.links" ]]; then chown -h $PUID:$PGID "$PLAYWRIGHT_BROWSERS_PATH"/.links/* fi +# also chown tmp dir +mkdir -p /tmp/archivebox +chown $PUID:$PGID /tmp +chown $PUID:$PGID /tmp/archivebox # (this check is written in blood in 2023, QEMU silently breaks things in ways that are not obvious) export IN_QEMU="$(pmap 1 | grep qemu >/dev/null && echo 'True' || echo 'False')"