fix: use UID 1000 for container user to match typical Linux host users (#77) master
authorStefan Gasser <redacted>
Fri, 13 Mar 2026 07:54:28 +0000 (08:54 +0100)
committerGitHub <redacted>
Fri, 13 Mar 2026 07:54:28 +0000 (08:54 +0100)
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

docker/Dockerfile

index 31b5b60b005081e47ae888cc2d87e33c8567090a..f7494e2ce59148577a2834f53c2b3f11eedb41ce 100644 (file)
@@ -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
git clone https://git.99rst.org/PROJECT