From c47a5944232b775f7b30bd7c877c97ba3756da9d Mon Sep 17 00:00:00 2001 From: Chirayu Desai Date: Mon, 10 Jul 2023 21:40:13 +0530 Subject: [PATCH] git: Set /repo as safe directory * https://stackoverflow.com/questions/69470009/git-diff-cached-unknown-option-cached * Fixes git.exc.GitCommandError: Cmd('git') failed due to: exit code(129) cmdline: git diff --cached --abbrev=40 --full-index --raw stderr: 'error: unknown option `cached' usage: git diff --no-index [] Closes #24 --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1675d33..4d28307 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,8 @@ RUN . /etc/profile.d/bsenv.sh \ && echo y | sdkmanager "build-tools;32.0.0" \ && apt-get clean && rm -rf /var/lib/apt/lists/* +RUN git config --global safe.directory /repo + VOLUME ["/repo"] WORKDIR /repo