Created
January 18, 2019 00:49
-
-
Save haizaar/7f10473bdeaaab0508f74f4eaae26f71 to your computer and use it in GitHub Desktop.
Crossbar Dockerfile alphine
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.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"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment