-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.build
28 lines (23 loc) · 1.13 KB
/
Dockerfile.build
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
FROM golang:1.11.2
ARG version=1.0.5
ARG arch=amd64
# Install required build packages
RUN apt-get update && apt-get install -y git protobuf-compiler curl
# Install Kubebuilder
## download the release
RUN curl -L -O https://github.com/kubernetes-sigs/kubebuilder/releases/download/v${version}/kubebuilder_${version}_linux_${arch}.tar.gz
## extract the archive
RUN tar -zxvf kubebuilder_${version}_linux_${arch}.tar.gz
RUN mv kubebuilder_${version}_linux_${arch} /usr/local/kubebuilder
## update your PATH to include /usr/local/kubebuilder/bin
ENV PATH=$PATH:/usr/local/kubebuilder/bin
# Install go tools
RUN go get k8s.io/code-generator/cmd/go-to-protobuf && \
go get github.com/gogo/protobuf/protoc-gen-gogo && \
go get github.com/gogo/protobuf/protoc-gen-gofast && \
go get github.com/gogo/protobuf/protoc-gen-gogofaster && \
go get golang.org/x/tools/cmd/goimports && \
go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway && \
go get github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger && \
go get github.com/golang/protobuf/protoc-gen-go && \
go get github.com/jessevdk/go-assets-builder