Files
protoc-docker/python/Dockerfile
Michael Pivato d0af2e21ba Split up python/swift dockerfiles
Doing this as I don't need to have both in a single container (not needed)
2021-02-02 13:08:29 +00:00

26 lines
1.0 KiB
Docker

FROM vato.ddns.net:8083/python AS CGRPC_BUILDER
ARG CGRPC_VERSION=v1.35.0
RUN apt update -y && apt install git build-essential autoconf libtool pkg-config zlib1g-dev curl clang -y
RUN git clone -b ${CGRPC_VERSION} --recursive https://github.com/grpc/grpc
RUN cd grpc && tools/bazel build //src/compiler:grpc_python_plugin
FROM vato.ddns.net:8083/alpine
ARG ARCH=x86_64
ARG PROTOC_VERSION=3.14.0
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk && \
apk add glibc-2.32-r0.apk && \
rm glibc-2.32-r0.apk
RUN wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${ARCH}.zip -O protoc.zip && \
unzip protoc.zip -d /usr/ && \
chmod +x /usr/bin/protoc && \
rm protoc.zip /usr/readme.txt
COPY --from=CGRPC_BUILDER /grpc/bazel-bin/src/compiler/grpc_python_plugin /usr/bin/protoc-gen-grpc-python