From 70c44cd8fd08fa571ed1a1a3bf9ba2e3f40bea01 Mon Sep 17 00:00:00 2001 From: Henry Warhurst Date: Thu, 17 Oct 2024 22:32:54 +0200 Subject: [PATCH] Fix git perms issue during docker copter build --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 22d8d67292ad25..363ce9372bad37 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,11 +37,14 @@ RUN SKIP_AP_EXT_ENV=$SKIP_AP_EXT_ENV SKIP_AP_GRAPHIC_ENV=$SKIP_AP_GRAPHIC_ENV SK DO_AP_STM_ENV=$DO_AP_STM_ENV \ AP_DOCKER_BUILD=1 \ USER=${USER_NAME} \ - Tools/environment_install/install-prereqs-ubuntu.sh -y + Tools/environment_install/install-prereqs-ubuntu.sh -y \ + git config --global --add safe.directory $PWD # Check that local/bin are in PATH for pip --user installed package RUN echo "if [ -d \"\$HOME/.local/bin\" ] ; then\nPATH=\"\$HOME/.local/bin:\$PATH\"\nfi" >> ~/.ardupilot_env + + # Create entrypoint as docker cannot do shell substitution correctly RUN export ARDUPILOT_ENTRYPOINT="/home/${USER_NAME}/ardupilot_entrypoint.sh" \ && echo "#!/bin/bash" > $ARDUPILOT_ENTRYPOINT \