This commit is contained in:
parent
425b0fe78e
commit
adeff1e4ee
14
Dockerfile
14
Dockerfile
@ -2,10 +2,13 @@ FROM golang:1.12-alpine
|
|||||||
|
|
||||||
ENV TZ=Europe/Moscow
|
ENV TZ=Europe/Moscow
|
||||||
ENV TERM=xterm-color
|
ENV TERM=xterm-color
|
||||||
|
|
||||||
ENV CGO_ENABLED=0
|
ENV CGO_ENABLED=0
|
||||||
ENV GOOS=linux
|
ENV GOOS=linux
|
||||||
ENV GOARCH=amd64
|
ENV GOARCH=amd64
|
||||||
|
|
||||||
ENV GOLANGCI=1.17.1
|
ENV GOLANGCI=1.17.1
|
||||||
|
ENV GOSWAG=1.6.2
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
apk add --no-cache --update bash curl git tzdata && \
|
apk add --no-cache --update bash curl git tzdata && \
|
||||||
@ -16,10 +19,19 @@ RUN \
|
|||||||
echo "${TZ}" > /etc/timezone && date
|
echo "${TZ}" > /etc/timezone && date
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
|
# golangci install
|
||||||
go get -u -v github.com/golangci/golangci-lint/cmd/golangci-lint && \
|
go get -u -v github.com/golangci/golangci-lint/cmd/golangci-lint && \
|
||||||
cd /go/src/github.com/golangci/golangci-lint && \
|
cd /go/src/github.com/golangci/golangci-lint && \
|
||||||
git checkout v${GOLANGCI} && \
|
git checkout v${GOLANGCI} && \
|
||||||
cd /go/src/github.com/golangci/golangci-lint/cmd/golangci-lint && \
|
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 install -ldflags "-X 'main.version=$(git describe --tags)' -X 'main.commit=$(git rev-parse --short HEAD)' -X 'main.date=$(date)'" && \
|
||||||
|
# goswag install
|
||||||
|
go get -u -v github.com/swaggo/swag/cmd/swag && \
|
||||||
|
cd /go/src/github.com/swaggo/swag && \
|
||||||
|
git checkout v${GOSWAG} && \
|
||||||
|
cd /go/src/github.com/swaggo/swag/cmd/swag && \
|
||||||
|
go install && \
|
||||||
|
# show versions
|
||||||
go version && \
|
go version && \
|
||||||
golangci-lint --version
|
golangci-lint --version && \
|
||||||
|
swag --version
|
||||||
|
Loading…
Reference in New Issue
Block a user