-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: proto builder and go1.21 comaptibility
- Loading branch information
Showing
5 changed files
with
125 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# This Dockerfile is used for proto generation | ||
FROM bufbuild/buf:1.28.0 as BUILDER | ||
|
||
FROM golang:1.21-alpine | ||
|
||
|
||
RUN apk add --no-cache \ | ||
nodejs \ | ||
npm \ | ||
git \ | ||
make | ||
|
||
ENV GOLANG_PROTOBUF_VERSION=1.28.0 \ | ||
GOGO_PROTOBUF_VERSION=1.3.2 \ | ||
GRPC_GATEWAY_VERSION=1.16.0 | ||
|
||
|
||
RUN go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest | ||
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} | ||
RUN go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION} \ | ||
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION} | ||
|
||
# install all gogo protobuf binaries | ||
RUN git clone https://github.com/regen-network/protobuf.git; \ | ||
cd protobuf; \ | ||
go mod download; \ | ||
make install | ||
|
||
# we need to use git clone because we use 'replace' directive in go.mod | ||
# protoc-gen-gocosmos was moved to to in cosmos/gogoproto but pending a migration there. | ||
RUN git clone https://github.com/regen-network/cosmos-proto.git; \ | ||
cd cosmos-proto/protoc-gen-gocosmos; \ | ||
go install . | ||
|
||
RUN npm install -g swagger-combine | ||
|
||
COPY --from=BUILDER /usr/local/bin /usr/local/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters