Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM python:3.7.2-alpine AS builder
- RUN apk add --no-cache --virtual .build-deps \
- build-base \
- libffi-dev \
- openssl-dev \
- linux-headers
- ENV PYROOT /pyroot
- ENV PATH $PYROOT/bin:$PATH
- ENV PYTHONUSERBASE $PYROOT
- RUN pip install --user crossbar
- FROM haizaar/python-minimal:3.7.2-alpine3.8-2 AS prod
- RUN apk add --no-cache openssl libffi
- ENV PYROOT /pyroot
- ENV PATH $PYROOT/bin:$PATH
- ENV PYTHONPATH $PYROOT/lib/python:$PATH
- # This is crucial for pkg_resources to work
- ENV PYTHONUSERBASE $PYROOT
- # Finally, copy artifacts
- COPY --from=builder $PYROOT/lib/ $PYROOT/lib/
- COPY --from=builder $PYROOT/bin/ $PYROOT/bin/
- ENTRYPOINT ["crossbar"]
Add Comment
Please, Sign In to add comment