From 3edb319ba90b870d753a1ec9362824285a7350d3 Mon Sep 17 00:00:00 2001 From: Micah R Ledbetter Date: Fri, 5 May 2023 23:47:02 -0500 Subject: [PATCH] Set /app permissions in the Dockerfile Add a note in readme to be careful of permissions with --reload --- Dockerfile | 2 +- README.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 30de5ef7..628beb94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -108,7 +108,7 @@ RUN apt-get update -qq \ # Install ArchiveBox Python package and its dependencies WORKDIR "$CODE_DIR" ADD . "$CODE_DIR" -RUN pip install -e . +RUN chown -R root:root . && chmod a+rX -R . && pip install -e . # Setup ArchiveBox runtime config WORKDIR "$DATA_DIR" diff --git a/README.md b/README.md index 156254fb..36590965 100644 --- a/README.md +++ b/README.md @@ -913,6 +913,7 @@ docker run -it -p 8000:8000 \ archivebox server 0.0.0.0:8000 --debug --reload # (remove the --reload flag and add the --nothreading flag when profiling with the django debug toolbar) +# When using --reload, make sure any files you create can be read by the user in the Docker container, eg with 'chmod a+rX'. ```