2023-06-12 02:40:12 +00:00
|
|
|
FROM golang:1.20-alpine
|
2019-02-02 12:04:44 +00:00
|
|
|
|
|
|
|
ENV TZ=Europe/Moscow
|
|
|
|
ENV TERM=xterm-color
|
2019-07-21 19:52:51 +00:00
|
|
|
|
2019-02-02 12:04:44 +00:00
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
ENV GOOS=linux
|
|
|
|
ENV GOARCH=amd64
|
2019-09-01 16:13:43 +00:00
|
|
|
ENV GO111MODULE=on
|
2021-11-15 13:34:03 +00:00
|
|
|
ENV GOPRIVATE=go.pkg.cx
|
2019-07-21 19:52:51 +00:00
|
|
|
|
2023-08-24 13:25:04 +00:00
|
|
|
ENV GOLANGCI=1.54.2
|
2019-02-02 12:04:44 +00:00
|
|
|
|
|
|
|
RUN \
|
|
|
|
apk add --no-cache --update bash curl git tzdata && \
|
|
|
|
rm -rf /var/cache/apk/*
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
cp /usr/share/zoneinfo/${TZ} /etc/localtime && \
|
|
|
|
echo "${TZ}" > /etc/timezone && date
|
|
|
|
|
|
|
|
RUN \
|
2019-09-01 17:19:32 +00:00
|
|
|
# install golangci-lint
|
2021-11-15 13:32:45 +00:00
|
|
|
go install -v -ldflags "-X 'main.version=${GOLANGCI}' -X 'main.date=$(date)'" github.com/golangci/golangci-lint/cmd/golangci-lint@v${GOLANGCI} && \
|
2019-09-01 17:19:32 +00:00
|
|
|
# cleanup
|
|
|
|
go clean -cache -modcache && \
|
|
|
|
# print versions
|
|
|
|
go version && \
|
2023-06-12 02:39:58 +00:00
|
|
|
golangci-lint --version
|