diff --git a/Makefile b/Makefile index e11589d3ae..29fe087c69 100644 --- a/Makefile +++ b/Makefile @@ -271,8 +271,8 @@ endif HTTPS_GIT := https://github.com/crypto-org-chain/cronos.git protoVer=0.14.0 -protoImageName=cosmossdk-proto -protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace --user root $(protoImageName) +protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) +protoImage=$(DOCKER) run --rm -v "$(CURDIR)":/workspace --workdir /workspace --user root $(protoImageName) # ------ # NOTE: If you are experiencing problems running these commands, try deleting @@ -281,8 +281,7 @@ protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace --use proto-all: proto-format proto-lint proto-gen proto-gen: - @echo "Generating Protobuf files ${CURDIR}" - $(DOCKER) build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools" + @echo "Generating Protobuf files" $(protoImage) sh ./scripts/protocgen.sh proto-lint: diff --git a/contrib/devtools/Dockerfile b/contrib/devtools/Dockerfile deleted file mode 100644 index 1959385c89..0000000000 --- a/contrib/devtools/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -## To test locally: -# docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools" -# docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh - -FROM bufbuild/buf:1.24.0 as BUILDER -FROM golang:1.21-alpine - -RUN apk add --no-cache \ - nodejs \ - npm \ - git \ - make \ - clang-extra-tools \ - g++ \ - jq - -RUN npm install -g swagger-combine - -ARG UNAME=protobuild -ARG UID=1000 -RUN adduser -u $UID -s /bin/sh $UNAME -D -USER $UNAME - -ENV GOLANG_PROTOBUF_VERSION=1.28.1 \ - GRPC_GATEWAY_VERSION=1.16.0 - -RUN go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest && \ - go install google.golang.org/protobuf/cmd/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} && \ - 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} && \ - go install cosmossdk.io/orm/cmd/protoc-gen-go-cosmos-orm@v1.0.0-beta.3 && \ - go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest - -# install all gogo protobuf binaries -RUN git clone https://github.com/cosmos/gogoproto.git; \ - cd gogoproto; \ - go mod download; \ - make install - -COPY --from=BUILDER /usr/local/bin /usr/local/bin