File tree 2 files changed +4
-0
lines changed
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$VERSION -X
13
13
FROM golang:1.21
14
14
# related to https://github.com/golangci/golangci-lint/issues/3107
15
15
ENV GOROOT /usr/local/go
16
+ # Set all directories as safe
17
+ RUN git config --global --add safe.directory '*'
16
18
# don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
17
19
COPY --from=builder /golangci/golangci-lint /usr/bin/
18
20
CMD ["golangci-lint" ]
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ ENV GOROOT /usr/local/go
22
22
# git and mercurial are needed most times for go get`, etc.
23
23
# See https://github.com/docker-library/golang/issues/80
24
24
RUN apk --no-cache add gcc musl-dev git mercurial
25
+ # Set all directories as safe
26
+ RUN git config --global --add safe.directory '*'
25
27
# don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
26
28
COPY --from=builder /golangci/golangci-lint /usr/bin/
27
29
CMD ["golangci-lint" ]
You can’t perform that action at this time.
0 commit comments