github.com/cosmos/cosmos-sdk@v0.50.10/contrib/devtools/Dockerfile (about)

     1  ## To test locally:
     2  # docker build --pull --rm -f "contrib/devtools/Dockerfile" -t cosmossdk-proto:latest "contrib/devtools"
     3  # docker run --rm -v $(pwd):/workspace --workdir /workspace cosmossdk-proto sh ./scripts/protocgen.sh
     4  
     5  FROM bufbuild/buf:1.24.0 as BUILDER
     6  FROM golang:1.21-alpine
     7  
     8  RUN apk add --no-cache \
     9    nodejs \
    10    npm \
    11    git \
    12    make \
    13    clang-extra-tools \
    14    g++ \
    15    jq
    16  
    17  RUN npm install -g swagger-combine
    18  
    19  ARG UNAME=protobuild
    20  ARG UID=1000
    21  RUN adduser -u $UID -s /bin/sh $UNAME -D
    22  USER $UNAME
    23  
    24  ENV GOLANG_PROTOBUF_VERSION=1.28.1 \
    25    GRPC_GATEWAY_VERSION=1.16.0
    26  
    27  RUN go install github.com/cosmos/cosmos-proto/cmd/protoc-gen-go-pulsar@latest && \
    28    go install google.golang.org/protobuf/cmd/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} && \
    29    go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@v${GRPC_GATEWAY_VERSION} \
    30    github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger@v${GRPC_GATEWAY_VERSION} && \
    31    go install cosmossdk.io/orm/cmd/protoc-gen-go-cosmos-orm@v1.0.0-beta.3 && \
    32    go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
    33  
    34  # install all gogo protobuf binaries
    35  RUN git clone https://github.com/cosmos/gogoproto.git; \
    36    cd gogoproto; \
    37    go mod download; \
    38    make install
    39  
    40  COPY --from=BUILDER /usr/local/bin /usr/local/bin