Last active
January 6, 2021 17:32
-
-
Save atomatt/a73cd111769fb32d37aefa27363ec962 to your computer and use it in GitHub Desktop.
General purpose protobuf tools image
This file contains hidden or 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
| FROM alpine as protoc | |
| RUN apk add unzip | |
| ADD https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protoc-3.14.0-linux-x86_64.zip / | |
| WORKDIR /protoc | |
| RUN unzip /protoc-3.14.0-linux-x86_64.zip | |
| FROM golang:1.15.6 as protoc-go | |
| RUN \ | |
| export GO111MODULE=on && \ | |
| go get google.golang.org/protobuf/cmd/protoc-gen-go \ | |
| google.golang.org/grpc/cmd/protoc-gen-go-grpc | |
| FROM alpine as googleapis | |
| RUN apk add git | |
| RUN git clone --depth=1 https://github.com/googleapis/googleapis | |
| FROM python | |
| RUN python -m pip install grpcio-tools | |
| COPY --from=protoc /protoc/bin/* /usr/local/bin/ | |
| COPY --from=protoc-go /go/bin/* /usr/local/bin/ | |
| COPY --from=protoc /protoc/include/* /usr/local/include/google/ | |
| COPY --from=googleapis /googleapis/google/api/* /usr/local/include/google/api/ | |
| WORKDIR /work | |
| ENTRYPOINT [] | |
| CMD ["sh"] |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
e.g.