diff --git a/Makefile b/Makefile index 6fbed4fa..fac7fb3a 100644 --- a/Makefile +++ b/Makefile @@ -36,7 +36,7 @@ WINDOWS_ARM64_BINARY=$(BINPATH)/windows-arm64/$(BINARY_NAME).exe .PHONY: docker docker: build-in-docker -%-in-docker: +%-in-docker: GITCOMMIT_SHA docker run --rm \ --user $(UID):$(GID) \ --env TARGET_GOOS=$(TARGET_GOOS) \ diff --git a/scripts/container_init.sh b/scripts/container_init.sh index c0bec0d0..f5843ca5 100755 --- a/scripts/container_init.sh +++ b/scripts/container_init.sh @@ -27,4 +27,7 @@ apk add --no-cache \ # Resolves permission issues for Go cache when # building credential helper as non-root user. mkdir /.cache && chmod 777 /.cache +# Resolves dubious ownership of git directory when +# building credential helper as root user. +git config --global --add safe.directory /go/src/github.com/awslabs/amazon-ecr-credential-helper