go/Dockerfile
Anton Zadvorny b44788a714
All checks were successful
continuous-integration/drone/push Build is passing
Bump versions
2020-01-25 20:20:21 +03:00

35 lines
933 B
Docker

FROM golang:1.13-alpine
ENV TZ=Europe/Moscow
ENV TERM=xterm-color
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
ENV GO111MODULE=on
ENV GOLANGCI=1.23.1
ENV GOSWAG=1.6.5
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 get -u -v github.com/golangci/golangci-lint/cmd/golangci-lint@v${GOLANGCI} && \
go install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'" github.com/golangci/golangci-lint/cmd/golangci-lint && \
# install goswag
go get -u -v github.com/swaggo/swag/cmd/swag@v${GOSWAG} && \
go install github.com/swaggo/swag/cmd/swag && \
# cleanup
go clean -cache -modcache && \
# print versions
go version && \
golangci-lint --version && \
swag --version