Dockerfile 740 B

12345678910111213141516171819202122232425262728293031
  1. FROM python:3.9.2-alpine3.13
  2. # Environment variables
  3. ENV PACKAGES=/usr/local/lib/python3.9/site-packages
  4. ENV PYTHONDONTWRITEBYTECODE=1
  5. # Set build directory
  6. WORKDIR /tmp
  7. COPY requirements.txt .
  8. RUN set -e ;\
  9. apk upgrade --update-cache -a ;\
  10. apk add --no-cache libstdc++ libffi-dev ;\
  11. apk add --no-cache --virtual .build gcc g++ musl-dev python3-dev cargo openssl-dev git;\
  12. pip install --no-cache-dir -r requirements.txt
  13. # clean
  14. RUN apk del .build ;\
  15. rm -rf /tmp/* /root/.cache
  16. # Set working directory
  17. WORKDIR /docs
  18. # Expose MkDocs development server port
  19. EXPOSE 8000
  20. ENV PYTHONPATH=$PYTHONPATH:/docs/python
  21. # Start development server by default
  22. ENTRYPOINT ["mkdocs"]
  23. CMD ["serve", "--dev-addr=0.0.0.0:8000"]