golangci-lint/build/buildx-alpine.Dockerfile
Ludovic Fernandez 1147824c61
Some checks failed
Release a tag / release (push) Has been cancelled
go1.23 support (#4836)
2024-08-13 19:43:35 +02:00

22 lines
643 B
Docker

# syntax=docker/dockerfile:1.4
FROM golang:1.23-alpine
# related to https://github.com/golangci/golangci-lint/issues/3107
ENV GOROOT /usr/local/go
# Allow to download a more recent version of Go.
# https://go.dev/doc/toolchain
# GOTOOLCHAIN=auto is shorthand for GOTOOLCHAIN=local+auto
ENV GOTOOLCHAIN auto
# gcc is required to support cgo;
# git and mercurial are needed most times for go get`, etc.
# See https://github.com/docker-library/golang/issues/80
RUN apk --no-cache add gcc musl-dev git mercurial
# Set all directories as safe
RUN git config --global --add safe.directory '*'
COPY golangci-lint /usr/bin/
CMD ["golangci-lint"]