Guest User

Untitled

a guest
Jan 18th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. FROM python:3.7.2-alpine AS builder
  2.  
  3. RUN apk add --no-cache --virtual .build-deps \
  4. build-base \
  5. libffi-dev \
  6. openssl-dev \
  7. linux-headers
  8.  
  9. ENV PYROOT /pyroot
  10. ENV PATH $PYROOT/bin:$PATH
  11. ENV PYTHONUSERBASE $PYROOT
  12. RUN pip install --user crossbar
  13.  
  14. FROM haizaar/python-minimal:3.7.2-alpine3.8-2 AS prod
  15.  
  16. RUN apk add --no-cache openssl libffi
  17.  
  18. ENV PYROOT /pyroot
  19. ENV PATH $PYROOT/bin:$PATH
  20. ENV PYTHONPATH $PYROOT/lib/python:$PATH
  21. # This is crucial for pkg_resources to work
  22. ENV PYTHONUSERBASE $PYROOT
  23.  
  24. # Finally, copy artifacts
  25. COPY --from=builder $PYROOT/lib/ $PYROOT/lib/
  26. COPY --from=builder $PYROOT/bin/ $PYROOT/bin/
  27.  
  28. ENTRYPOINT ["crossbar"]
Add Comment
Please, Sign In to add comment