-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile.base
35 lines (29 loc) · 1.55 KB
/
Dockerfile.base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# vim: ft=dockerfile
# --------------------
# Main stage
# --------------------
FROM golang:1.13-buster
ARG PROTOC_VERSION=3.9.0
ARG PROTOC_FILE=protoc-${PROTOC_VERSION}-linux-x86_64.zip
ARG GOGO_VERSION=1.2.1
ARG PROTO_GEN_DOC_VERSION=1.3.0
ARG GOLANGCI_LINT_VERSION=1.18.0
RUN apt-get update -qq && apt-get install -y --no-install-recommends ed wget build-essential git mercurial unzip logrotate cron runit sqlite3 ca-certificates \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN GO111MODULE=on go get github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@v${PROTO_GEN_DOC_VERSION}
RUN GO111MODULE=on go get github.com/gogo/protobuf/protoc-gen-gofast@v${GOGO_VERSION}
RUN GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v${GOLANGCI_LINT_VERSION}
RUN go get github.com/volatiletech/sqlboiler/...
RUN go get github.com/volatiletech/sqlboiler-sqlite3/...
RUN go get github.com/volatiletech/sqlboiler/drivers/sqlboiler-psql/...
RUN go get github.com/rubenv/sql-migrate/...
RUN go get golang.org/x/tools/cmd/cover
RUN go get github.com/mattn/goveralls
RUN go get github.com/wadey/gocovmerge/...
RUN go get github.com/gobuffalo/packr/...
# have to do this twice to get the proto additions
RUN GO111MODULE=off go get -d github.com/gogo/protobuf/...
RUN wget --quiet https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_FILE} && \
echo "15e395b648a1a6dda8fd66868824a396e9d3e89bc2c8648e3b9ab9801bea5d55 ${PROTOC_FILE}" | sha256sum -c - && \
unzip -qq ${PROTOC_FILE} -d /usr && \
rm ${PROTOC_FILE}