Skip to content

Commit 789b807

Browse files
Shironexclaude
andcommitted
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>
1 parent 35b3d39 commit 789b807

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ COPY --from=server-builder /app/node_modules ./node_modules
9292
# Create data and projects directories
9393
RUN mkdir -p /data /projects && chown automaker:automaker /data /projects
9494

95+
# Configure git for mounted volumes (ownership mismatch between host/container)
96+
# Use --system so it's not overwritten by mounted user .gitconfig
97+
RUN git config --system --add safe.directory '*'
98+
9599
# Switch to non-root user
96100
USER automaker
97101

0 commit comments

Comments
 (0)