From c7dbd7ffe64e72d1acf66b68a813030c70cbff49 Mon Sep 17 00:00:00 2001 From: I748376 Date: Tue, 30 Jul 2024 15:00:58 +0000 Subject: [PATCH] removes 'dubious ownership' error when trying to access git repositories with a different user' --- prospector/docker/worker/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/prospector/docker/worker/Dockerfile b/prospector/docker/worker/Dockerfile index e5421220c..fd3b9863f 100644 --- a/prospector/docker/worker/Dockerfile +++ b/prospector/docker/worker/Dockerfile @@ -73,4 +73,11 @@ VOLUME [ "/data_sources/reports" ] RUN chmod +x /usr/local/bin/start_rq_worker.sh #CMD tail -f /dev/null + +# Create directory for gitcache and run git config command to avoid 'dubious ownership' error +RUN mkdir -p /tmp/gitcache && \ + cd /tmp/gitcache && \ + git config --global --add safe.directory '*' + + ENTRYPOINT ["/usr/local/bin/start_rq_worker.sh"]