Set git `safe.directory` in tool containers
Otherwise it hit the "dubious ownership" case.
This commit is contained in:
parent
b5b0558d58
commit
750e20e6da
|
|
@ -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 /
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue