Created
November 28, 2019 17:30
-
-
Save mesmacosta/cbc4b92fe2c49155b66ce1fd16c816a5 to your computer and use it in GitHub Desktop.
Docker alpine python + grpc
This file contains 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 python:3.7-alpine as base | |
# install gcc and grpc dependencies | |
FROM base as builder | |
RUN apk add --update --no-cache \ | |
gcc \ | |
linux-headers \ | |
make \ | |
musl-dev \ | |
python-dev \ | |
g++ | |
ENV GRPC_PYTHON_VERSION 1.15.0 | |
RUN python -m pip install --upgrade pip | |
RUN pip install --install-option="--prefix=/install" grpcio==${GRPC_PYTHON_VERSION} grpcio-tools==${GRPC_PYTHON_VERSION} grpcio-reflection==${GRPC_PYTHON_VERSION} grpcio-health-checking==${GRPC_PYTHON_VERSION} grpcio-testing==${GRPC_PYTHON_VERSION} | |
FROM base | |
ENV GRPC_PYTHON_VERSION 1.15.0 | |
COPY --from=builder /install /usr/local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment