From 789b8075425a049c67ad9dedd1bd91df1832de84 Mon Sep 17 00:00:00 2001 From: Kacper Date: Sun, 28 Dec 2025 20:32:49 +0100 Subject: [PATCH] fix: configure git safe.directory for mounted volumes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 26bab190..26cf0d6c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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