fix: configure git safe.directory for mounted volumes

Use system-level gitconfig to set safe.directory='*' so it works
with mounted volumes and isn't overwritten by user's mounted .gitconfig.

Fixes git "dubious ownership" errors when working with projects
mounted from the host.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Kacper
2025-12-28 20:32:49 +01:00
parent 35b3d3931e
commit 789b807542

View File

@@ -92,6 +92,10 @@ COPY --from=server-builder /app/node_modules ./node_modules
# Create data and projects directories
RUN mkdir -p /data /projects && chown automaker:automaker /data /projects
# Configure git for mounted volumes (ownership mismatch between host/container)
# Use --system so it's not overwritten by mounted user .gitconfig
RUN git config --system --add safe.directory '*'
# Switch to non-root user
USER automaker