diff --git a/Dockerfile b/Dockerfile index 40343ab..ff307a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,14 @@ FROM hashicorp/terraform:$TERRAFORM_VERSION AS terraform FROM golang:1.17.11-alpine3.16 RUN apk --no-cache add make git bash + +# A workaround for a permission issue of git. +# Since UIDs are different between host and container, +# the .git directory is untrusted by default. +# We need to allow it explicitly. +# https://github.com/actions/checkout/issues/760 +RUN git config --global --add safe.directory /work + COPY --from=terraform /bin/terraform /usr/local/bin/ WORKDIR /work