File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ RUN htpasswd -b -c /etc/htpasswd testuser testpass
4242
4343# Callers should mount a directory with git repos here.
4444VOLUME /git
45+ # sshd runs as root, and the repo directory might be owned by anyone.
46+ RUN git config --system safe.directory '*'
4547
4648COPY nginx.conf /etc/nginx/
4749COPY run.sh /
Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ VOLUME /dot_ssh
4949
5050# Callers should mount a directory with git repos here.
5151VOLUME /git
52+ # sshd runs as root, and the repo directory might be owned by anyone.
53+ RUN git config --system safe.directory '*'
5254
5355# Callers can SSH as user "test"
5456RUN echo "test:x:65533:65533::/home/test:/usr/bin/git-shell" >> /etc/passwd
You can’t perform that action at this time.
0 commit comments