-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (38 loc) · 1.43 KB
/
Dockerfile
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
36
37
38
39
40
41
42
43
44
45
46
FROM golang:1.17.5
ENV CLOUD_SDK_VERSION 367.0.0
ENV PROTOC_GEN_GO_VERSION 1.27.1
ENV GOLANGCI_LINT_VERSION 1.43.0
RUN apt-get update
# prepare to install git-lfs
RUN apt-get install -y \
&& curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
# install
RUN apt-get install -y \
libmecab2 \
libmecab-dev \
mecab \
mecab-utils \
parallel \
awscli \
ca-certificates \
git-lfs \
protobuf-compiler \
&& rm -rf /var/lib/apt/lists/*
RUN update-ca-certificates
# install gcloud command
ENV CLOUD_SDK_URL https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz
ENV PATH $PATH:/google-cloud-sdk/bin
RUN curl -o google-cloud-sdk.tar.gz ${CLOUD_SDK_URL} \
&& tar zxf google-cloud-sdk.tar.gz \
&& mv google-cloud-sdk /google-cloud-sdk \
&& /google-cloud-sdk/install.sh -q \
&& /google-cloud-sdk/bin/gcloud components update -q
# install some go tools
RUN go install github.com/TeamMomentum/go-bindata/go-bindata@latest \
&& go install github.com/rakyll/statik@latest \
&& go install golang.org/x/tools/cmd/stringer@latest \
&& go install google.golang.org/protobuf/cmd/protoc-gen-go@v${PROTOC_GEN_GO_VERSION}
# golangci-lint
RUN curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v${GOLANGCI_LINT_VERSION}
RUN golangci-lint --version
COPY golangci.yml /golangci.yml