Skip to content

Commit ac0ef8b

Browse files
fix: Configure safe directory for git in dockerfile
1 parent 5c4fc3d commit ac0ef8b

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

dev/docker/Dockerfile

Lines changed: 6 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
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 && \
@@ -36,3 +39,6 @@ RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" && \
3639
ENV APACHE_DOCUMENT_ROOT="/app/public"
3740

3841
WORKDIR /app
42+
43+
44+

dev/docker/entrypoint.app.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash
22

3-
# Git 2.35+ may refuse to operate on bind-mounted repos with differing ownership ("dubious ownership").
4-
# Mark /app as safe within the container.
5-
git config --global --add safe.directory /app 2>/dev/null || true
6-
73
set -e
84

95
env

dev/docker/entrypoint.node.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/sh
22

3-
# Git 2.35+ may refuse to operate on bind-mounted repos with differing ownership ("dubious ownership").
4-
# Mark /app as safe within the container.
5-
git config --global --add safe.directory /app 2>/dev/null || true
6-
73
set -e
84

95
npm install

0 commit comments

Comments
 (0)