diff --git a/go-alpine.Dockerfile b/go-alpine.Dockerfile index 19b0f0a..4f652a7 100644 --- a/go-alpine.Dockerfile +++ b/go-alpine.Dockerfile @@ -1,2 +1,5 @@ FROM golang:1.26-alpine -RUN apk add --no-cache nodejs npm bash git ca-certificates \ No newline at end of file +ARG GOLANGCI_LINT_VERSION=v2.11.4 +RUN apk add --no-cache nodejs npm bash git ca-certificates +RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \ + | sh -s -- -b /usr/local/bin ${GOLANGCI_LINT_VERSION} \ No newline at end of file diff --git a/go.Dockerfile b/go.Dockerfile index 4526c20..0ab37b2 100644 --- a/go.Dockerfile +++ b/go.Dockerfile @@ -1,5 +1,5 @@ FROM golang:1.26-bookworm - +ARG GOLANGCI_LINT_VERSION=v2.11.4 RUN apt-get update && \ apt-get install -y --no-install-recommends ca-certificates curl gnupg bash git && \ mkdir -p /etc/apt/keyrings && \ @@ -12,4 +12,6 @@ RUN apt-get update && \ go version && node -v && npm -v && \ apt-get purge -y --auto-remove curl gnupg && \ apt-get clean && \ - rm -rf /var/lib/apt/lists/* \ No newline at end of file + rm -rf /var/lib/apt/lists/* +RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \ + | sh -s -- -b /usr/local/bin ${GOLANGCI_LINT_VERSION} \ No newline at end of file