26 lines
739 B
Docker
26 lines
739 B
Docker
FROM golang:1.11-alpine
|
|
|
|
ENV TZ=Europe/Moscow
|
|
ENV TERM=xterm-color
|
|
ENV CGO_ENABLED=0
|
|
ENV GOOS=linux
|
|
ENV GOARCH=amd64
|
|
ENV GOLANGCI=1.13
|
|
|
|
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 \
|
|
go get -u -v github.com/golangci/golangci-lint/cmd/golangci-lint && \
|
|
cd /go/src/github.com/golangci/golangci-lint && \
|
|
git checkout v${GOLANGCI} && \
|
|
cd /go/src/github.com/golangci/golangci-lint/cmd/golangci-lint && \
|
|
go install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'" && \
|
|
go version && \
|
|
golangci-lint --version
|