Skip to content

Commit 062f0fe

Browse files
authored
fix: Set mount dir and all subdirectories as trusted git directories (#6)
* fix: Set mount dir and all subdirectories as trusted git directories #5
1 parent 69e50fc commit 062f0fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ RUN npm install --omit=dev \
2323

2424
FROM base as app
2525

26-
RUN git config --global --add safe.directory /filesOnServer
27-
2826
ARG APP_BUILD_VERSION
2927
ENV APP_VERSION=$APP_BUILD_VERSION
3028

3129
USER 1000
3230

31+
# https://stackoverflow.com/a/78818156/1469797
32+
RUN git config --global --add safe.directory "/filesOnServer" && git config --global --add safe.directory "/filesOnServer/*"
33+
3334
WORKDIR /usr/src/app
3435

3536
COPY --chown=node:node --from=builder /usr/src/app /usr/src/app

0 commit comments

Comments
 (0)