pool/tools/Dockerfile
Oliver Gugger 995b136149
make+tools: don't compile with build tag to avoid collision
It looks like one of the projects pulled in by the linter also uses the
"tools" build tag. When we turn on that build tag, we get build errors
in github.com/ryancurrah/gomodguard. So we just remove the build tag
during compilation as it's not actually needed (the build tag is just
there to not pull in the dependencies during the normal build).
2023-02-23 11:25:50 +01:00

17 lines
413 B
Docker

FROM golang:1.19.4
RUN apt-get update && apt-get install -y git
ENV GOCACHE=/tmp/build/.cache
ENV GOMODCACHE=/tmp/build/.modcache
ENV GOFLAGS="-buildvcs=false"
COPY . /tmp/tools
RUN cd /tmp \
&& mkdir -p /tmp/build/.cache \
&& mkdir -p /tmp/build/.modcache \
&& cd /tmp/tools \
&& go install -trimpath github.com/golangci/golangci-lint/cmd/golangci-lint \
&& chmod -R 777 /tmp/build/
WORKDIR /build