build: remove unused tools from being installed (#12671)
This commit is contained in:
parent
12523197f9
commit
67bedd02cc
|
@ -5,8 +5,6 @@ SHELL = bash
|
|||
GOTOOLS = \
|
||||
github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs@master \
|
||||
github.com/hashicorp/go-bindata/go-bindata@master \
|
||||
golang.org/x/tools/cmd/cover@master \
|
||||
golang.org/x/tools/cmd/stringer@master \
|
||||
github.com/vektra/mockery/cmd/mockery@master \
|
||||
github.com/golangci/golangci-lint/cmd/golangci-lint@v1.40.1 \
|
||||
github.com/hashicorp/lint-consul-retry@master
|
||||
|
|
|
@ -1,21 +1,7 @@
|
|||
ARG GOLANG_VERSION=1.17.5
|
||||
FROM golang:${GOLANG_VERSION}
|
||||
|
||||
ARG GOTOOLS="github.com/elazarl/go-bindata-assetfs/... \
|
||||
github.com/hashicorp/go-bindata/... \
|
||||
golang.org/x/tools/cmd/cover \
|
||||
golang.org/x/tools/cmd/stringer \
|
||||
github.com/axw/gocov/gocov \
|
||||
gopkg.in/matm/v1/gocov-html"
|
||||
|
||||
RUN mkdir -p .gotools && \
|
||||
cd .gotools && \
|
||||
for tool in ${GOTOOLS}; do \
|
||||
echo "=== TOOL: ${tool}" ; \
|
||||
rm -rf go.mod go.sum ; \
|
||||
go mod init consul-tools ; \
|
||||
go get -v "${tool}" ; \
|
||||
done && \
|
||||
rm -rf go.mod go.sum
|
||||
RUN go install github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs@master
|
||||
RUN go install github.com/hashicorp/go-bindata/go-bindata@master
|
||||
|
||||
WORKDIR /consul
|
||||
|
|
Loading…
Reference in New Issue