fix: set an explicit GOROOT in the Docker image for go-critic (#3106)
This commit is contained in:
parent
63b2fe0048
commit
970b0a5bd7
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1,2 +1 @@
|
||||
go.sum linguist-generated
|
||||
Dockerfile.* linguist-language=Dockerfile
|
||||
|
2
.github/workflows/tag.yml
vendored
2
.github/workflows/tag.yml
vendored
@ -37,7 +37,7 @@ jobs:
|
||||
matrix:
|
||||
target:
|
||||
- Dockerfile: build/Dockerfile
|
||||
- Dockerfile: build/Dockerfile.alpine
|
||||
- Dockerfile: build/alpine.Dockerfile
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
|
@ -11,6 +11,8 @@ RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$VERSION -X
|
||||
|
||||
# stage 2
|
||||
FROM golang:1.19
|
||||
# related to https://github.com/golangci/golangci-lint/issues/3107
|
||||
ENV GOROOT /usr/local/go
|
||||
# don't place it into $GOPATH/bin because Drone mounts $GOPATH as volume
|
||||
COPY --from=builder /golangci/golangci-lint /usr/bin/
|
||||
CMD ["golangci-lint"]
|
||||
|
@ -16,6 +16,8 @@ RUN CGO_ENABLED=0 go build -trimpath -ldflags "-s -w -X main.version=$VERSION -X
|
||||
|
||||
# stage 2
|
||||
FROM golang:1.19-alpine
|
||||
# related to https://github.com/golangci/golangci-lint/issues/3107
|
||||
ENV GOROOT /usr/local/go
|
||||
# gcc is required to support cgo;
|
||||
# git and mercurial are needed most times for go get`, etc.
|
||||
# See https://github.com/docker-library/golang/issues/80
|
Loading…
x
Reference in New Issue
Block a user