File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 11ARG ALPINE_VERSION=3.13
2- ARG GO_VERSION=1.14.15
2+ ARG GO_VERSION=1.17.3
33ARG GRPC_GATEWAY_VERSION=1.16.0
44ARG GRPC_JAVA_VERSION=1.35.0
55ARG GRPC_CSHARP_VERSION=1.35.0
66ARG GRPC_VERSION=1.35.0
7- ARG PROTOC_GEN_GO_VERSION=1.4.3
7+ ARG PROTOC_GEN_GO_VERSION=1.31.0
88# v1.3.2, using the version directly does not work: "tar: invalid magic"
99ARG PROTOC_GEN_GOGO_VERSION=b03c65ea87cdc3521ede29f62fe3ce239267c1bc
1010ARG PROTOC_GEN_LINT_VERSION=0.2.1
@@ -74,13 +74,10 @@ RUN git clone --recursive --depth=1 -b v${GRPC_CSHARP_VERSION} https://github.co
7474
7575FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} as go_builder
7676RUN apk add --no-cache build-base curl git
77+ ENV GOBIN=/out/usr/bin
7778
7879ARG PROTOC_GEN_GO_VERSION
79- RUN mkdir -p ${GOPATH}/src/github.com/golang/protobuf && \
80- curl -sSL https://api.github.com/repos/golang/protobuf/tarball/v${PROTOC_GEN_GO_VERSION} | tar xz --strip 1 -C ${GOPATH}/src/github.com/golang/protobuf &&\
81- cd ${GOPATH}/src/github.com/golang/protobuf && \
82- go build -ldflags '-w -s' -o /golang-protobuf-out/protoc-gen-go ./protoc-gen-go && \
83- install -Ds /golang-protobuf-out/protoc-gen-go /out/usr/bin/protoc-gen-go
80+ RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v${PROTOC_GEN_GO_VERSION}
8481
8582ARG PROTOC_GEN_GOGO_VERSION
8683RUN mkdir -p ${GOPATH}/src/github.com/gogo/protobuf && \
You can’t perform that action at this time.
0 commit comments