go/Dockerfile
Anton Zadvorny 03a2c69c6d
All checks were successful
continuous-integration/drone Build is passing
continuous-integration/drone/tag Build is passing
Bump versions
2024-08-07 15:18:23 +03:00

27 lines
630 B
Docker

FROM golang:1.22-alpine
ENV TZ=Europe/Moscow
ENV TERM=xterm-color
ENV CGO_ENABLED=0
ENV GOPRIVATE=go.pkg.cx
ENV GOLANGCI=1.59.1
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 \
# install golangci-lint
go install -v -ldflags "-X 'main.version=${GOLANGCI}' -X 'main.date=$(date)'" github.com/golangci/golangci-lint/cmd/golangci-lint@v${GOLANGCI} && \
# cleanup
go clean -cache -modcache && \
# print versions
go version && \
golangci-lint --version