From ae1640736c95a197476ee0dd298f50e38dc57e8b Mon Sep 17 00:00:00 2001 From: Sedetius Date: Sat, 23 Aug 2025 12:28:06 +0200 Subject: [PATCH] Moved user creation in kiwix-serve dockerfile before COPY start.sh to automatically use the new users file permissions. --- docker/server/Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docker/server/Dockerfile b/docker/server/Dockerfile index 65501c0..6726494 100644 --- a/docker/server/Dockerfile +++ b/docker/server/Dockerfile @@ -9,13 +9,11 @@ EXPOSE 8080 VOLUME /data WORKDIR /data -COPY ./start.sh /usr/local/bin/ - # Create non-root user for better security RUN addgroup -S user && adduser -S user -G user -# Change ownership of the start script to the new user -RUN chown user:user /usr/local/bin/start.sh # Switch to the non-root user USER user +COPY ./start.sh /usr/local/bin/ + ENTRYPOINT ["/usr/bin/dumb-init", "--", "/usr/local/bin/start.sh"]