fix(docker): tell Git that the workdir is safe

When bind-mounting a Git repository to the workdir, Git would complain about 'dubious ownership'.

We add an exception to the global Git config, in the way Git tells us to.
This should be safe since
- we run in a container, and
- the user can set the mount to read-only.

refs: issue #179
This commit is contained in:
Raphael 2025-01-03 14:00:30 +01:00 committed by GitHub
parent 4d515b88b3
commit 115b21a48d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,5 +23,6 @@ ENV _GIT_SINCE= \
TERM=xterm-256color
WORKDIR /git
RUN git config --global --add safe.directory /git
ENTRYPOINT [ "/usr/local/bin/docker-entrypoint" ]
CMD [ "/usr/bin/git", "quick-stats" ]
CMD [ "/usr/bin/git", "quick-stats" ]