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.

27 lines
814 B

  1. FROM bufbuild/buf:latest as buf
  2. FROM golang:1.14-alpine3.11 as builder
  3. RUN apk add --update --no-cache build-base curl git upx && \
  4. rm -rf /var/cache/apk/*
  5. ENV GOLANG_PROTOBUF_VERSION=1.3.1 \
  6. GOGO_PROTOBUF_VERSION=1.3.2
  7. RUN GO111MODULE=on go get \
  8. github.com/golang/protobuf/protoc-gen-go@v${GOLANG_PROTOBUF_VERSION} \
  9. github.com/gogo/protobuf/protoc-gen-gogo@v${GOGO_PROTOBUF_VERSION} \
  10. github.com/gogo/protobuf/protoc-gen-gogofaster@v${GOGO_PROTOBUF_VERSION} && \
  11. mv /go/bin/protoc-gen-go* /usr/local/bin/
  12. FROM alpine:edge
  13. WORKDIR /work
  14. RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
  15. apk add --update --no-cache clang && \
  16. rm -rf /var/cache/apk/*
  17. COPY --from=builder /usr/local/bin /usr/local/bin
  18. COPY --from=buf /usr/local/bin /usr/local/bin