diff --git a/_test_tools/httpd/Dockerfile b/_test_tools/httpd/Dockerfile index 2838d4948..f0473331d 100644 --- a/_test_tools/httpd/Dockerfile +++ b/_test_tools/httpd/Dockerfile @@ -42,6 +42,8 @@ RUN htpasswd -b -c /etc/htpasswd testuser testpass # Callers should mount a directory with git repos here. VOLUME /git +# sshd runs as root, and the repo directory might be owned by anyone. +RUN git config --system safe.directory '*' COPY nginx.conf /etc/nginx/ COPY run.sh / diff --git a/_test_tools/sshd/Dockerfile b/_test_tools/sshd/Dockerfile index 9b05b1d0e..c8caa682c 100644 --- a/_test_tools/sshd/Dockerfile +++ b/_test_tools/sshd/Dockerfile @@ -49,6 +49,8 @@ VOLUME /dot_ssh # Callers should mount a directory with git repos here. VOLUME /git +# sshd runs as root, and the repo directory might be owned by anyone. +RUN git config --system safe.directory '*' # Callers can SSH as user "test" RUN echo "test:x:65533:65533::/home/test:/usr/bin/git-shell" >> /etc/passwd