lnd/tools/Dockerfile
Elle Mouton 88f5369066
tools+.: add custom linter configuration file
Add this file both to the main LND directory so that devs can use it for
local linter runs and also add it to the `tools` directory so that the
docker environment used to run the linter in CI has access to it. A
custom linter binary can be built via `golangci-lint custom`. This will
pull in and register all the plugins listed in the new config file when
building the new binary. The new binary can then be run using
`custom-gcl run`.
2024-12-02 09:14:21 +02:00

19 lines
515 B
Docker

FROM golang:1.22.6
RUN apt-get update && apt-get install -y git
ENV GOCACHE=/tmp/build/.cache
ENV GOMODCACHE=/tmp/build/.modcache
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 \
&& golangci-lint custom \
&& mv ./custom-gcl /usr/local/bin/custom-gcl \
&& chmod -R 777 /tmp/build/ \
&& git config --global --add safe.directory /build
WORKDIR /build