From: Stefan Gasser Date: Fri, 13 Mar 2026 07:54:28 +0000 (+0100) Subject: fix: use UID 1000 for container user to match typical Linux host users (#77) X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=HEAD;p=sgasser-llm-shield.git fix: use UID 1000 for container user to match typical Linux host users (#77) Fixes permission denied errors when mounting volumes. Most Linux desktop users have UID 1000, so bind-mounted directories now work without manual chown. Fixes #76 --- diff --git a/docker/Dockerfile b/docker/Dockerfile index 31b5b60..f7494e2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -86,14 +86,14 @@ COPY --from=bun-builder /app/package.json ./ COPY --from=bun-builder /app/tsconfig.json ./ COPY config.example.yaml ./ -# Create data directory and set permissions for non-root user -RUN mkdir -p /pasteguard/data && chown -R 1001:1001 /pasteguard +# Create data directory and set permissions for UID 1000 (matches most Linux users) +RUN mkdir -p /pasteguard/data && chown -R 1000:1000 /pasteguard # Copy supervisor configuration COPY docker/supervisord.conf /etc/supervisor/conf.d/pasteguard.conf -# Switch back to non-root user for runtime -USER 1001 +# Switch to non-root user for runtime +USER 1000 # Environment defaults ENV PRESIDIO_URL=http://localhost:5002