From 115b21a48d15af4aee6e75d982a947567233107c Mon Sep 17 00:00:00 2001 From: Raphael <4246780+reitzig@users.noreply.github.com> Date: Fri, 3 Jan 2025 14:00:30 +0100 Subject: [PATCH] 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 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4394d34..2f404a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" ] \ No newline at end of file +CMD [ "/usr/bin/git", "quick-stats" ]