You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
944 B

  1. # This Dockerfile defines an image containing tools for linting, formatting,
  2. # and compiling the Tendermint protos.
  3. FROM golang:1.17-alpine
  4. # Install a commonly used set of programs for use with our protos.
  5. # clang-extra-tools is included here because it provides clang-format,
  6. # used to format the .proto files.
  7. RUN apk add --no-cache build-base clang-extra-tools curl git
  8. ENV GOLANG_PROTOBUF_VERSION=1.3.1 \
  9. GOGO_PROTOBUF_VERSION=1.3.2
  10. # Retrieve the go protoc programs and copy them into the PATH
  11. RUN go install github.com/golang/protobuf/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} && \
  12. go install github.com/gogo/protobuf/protoc-gen-gogo@v${GOGO_PROTOBUF_VERSION} && \
  13. go install github.com/gogo/protobuf/protoc-gen-gogofaster@v${GOGO_PROTOBUF_VERSION} && \
  14. mv "$(go env GOPATH)"/bin/* /usr/local/bin/
  15. # Copy the 'buf' program out of the buildbuf/buf container.
  16. COPY --from=bufbuild/buf:latest /usr/local/bin/* /usr/local/bin/