From 0ba37d29fb0aced2b43a4873544450babecbb413 Mon Sep 17 00:00:00 2001 From: Simone Basso Date: Mon, 29 Aug 2022 12:34:37 +0200 Subject: [PATCH] fix: repair broken linux-static build The issue here is that the repository is owned by the user who runs the command and the container runs as root. --- CLI/go-build-alpine | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CLI/go-build-alpine b/CLI/go-build-alpine index 52a2f26ddb..b78ec788cc 100755 --- a/CLI/go-build-alpine +++ b/CLI/go-build-alpine @@ -3,7 +3,10 @@ set -euxo pipefail apk update apk upgrade apk add --no-progress gcc git linux-headers musl-dev -# some of the following exports are redundant but are however +# We need to force git to look into this repository owned by the +# user outside docker rather than by the user running docker +git config --global --add safe.directory $(pwd) +# Some of the following exports are redundant but are however # useful because they provide explicit logging export CGO_ENABLED=1 export GOARM=$GOARM