Skip to content

Commit

Permalink
Fix the git permission issue
Browse files Browse the repository at this point in the history
  • Loading branch information
minamijoyo committed Aug 24, 2023
1 parent 00ec47c commit 143c51c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 143c51c

Please sign in to comment.