From cee9ea67fca74a0836111fec76b16ade5e027122 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 5 Nov 2025 09:30:20 +0100 Subject: [PATCH] lint: run in go-modules mode Prevent the linter from recursing to other modules (cmd/docker-trust), which don't have their dependencies vendored. Signed-off-by: Sebastiaan van Stijn --- dockerfiles/Dockerfile.lint | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dockerfiles/Dockerfile.lint b/dockerfiles/Dockerfile.lint index a06dd22a3..77aa04db1 100644 --- a/dockerfiles/Dockerfile.lint +++ b/dockerfiles/Dockerfile.lint @@ -18,6 +18,9 @@ ENV CGO_ENABLED=0 ENV GOGC=75 WORKDIR /go/src/github.com/docker/cli COPY --link --from=golangci-lint /usr/bin/golangci-lint /usr/bin/golangci-lint -RUN --mount=type=bind,target=. \ +RUN --mount=type=bind,target=.,rw \ --mount=type=cache,target=/root/.cache \ + rm -f go.mod go.sum && \ + ln -s vendor.mod go.mod && \ + ln -s vendor.sum go.sum && \ golangci-lint run