Skip to content

Commit e6b754f

Browse files
authored
Merge pull request #5969 from shaoliang123456/fix/git-safe-directory-in-docker
Git 2.35+ may refuse to operate on bind-mounted repos with differing ownership ("dubious ownership"), Mark /app as safe within the container.
2 parents 07ec880 + 018de5d commit e6b754f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dev/docker/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ RUN apt-get update && \
1414
wait-for-it && \
1515
rm -rf /var/lib/apt/lists/*
1616

17+
# Mark /app as safe for Git >= 2.35.2
18+
RUN git config --system --add safe.directory /app
19+
1720
# Install PHP extensions
1821
RUN docker-php-ext-configure ldap --with-libdir="lib/$(gcc -dumpmachine)" && \
1922
docker-php-ext-configure gd --with-freetype --with-jpeg && \

0 commit comments

Comments
 (0)