Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of multistage Docker build for grpc
FROM alpine:3.6 AS base
RUN apk add --no-cache python3 ca-certificates tzdata tini \
&& apk upgrade --no-cache
FROM base AS build
RUN apk add --no-cache \
python3-dev \
cython \
COPY requirements.txt /app/
RUN pip3 install --no-cache-dir --upgrade -r /app/requirements.txt
FROM base
COPY --from=build /usr/lib/python3.6/site-packages/ /usr/lib/python3.6/site-packages/
COPY /app/
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/usr/bin/env", "python3", ""]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.