From e72d8437f75f7f11457b3605181a7d346900b337 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 21 Feb 2022 09:33:30 -0700 Subject: [PATCH] [Docker] Split config dir creation/set permissions If the config dir already exists, setting the mode (`-m 777`) doesn't actually work as it should. This change splits the command into two separate commands for directory creation and enabling the directory to be writable by all. Fixes #658 --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index b6f6483..dac0098 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,8 @@ RUN apk -U upgrade ARG DOCKER_USER=whoogle ARG DOCKER_USERID=927 ARG config_dir=/config -RUN mkdir -p -m 777 $config_dir +RUN mkdir -p $config_dir +RUN chmod a+w $config_dir VOLUME $config_dir ARG username='' @@ -75,7 +76,7 @@ COPY run . RUN adduser -D -g $DOCKER_USERID -u $DOCKER_USERID $DOCKER_USER # Fix ownership / permissions -RUN chown -R ${DOCKER_USER}:${DOCKER_USER} /whoogle /var/lib/tor +RUN chown -R ${DOCKER_USER}:${DOCKER_USER} /whoogle /var/lib/tor # Allow writing symlinks to build dir RUN chown $DOCKER_USERID:$DOCKER_USERID app/static/build