Dockerfile 709 B

123456789101112131415161718192021222324252627282930313233
  1. FROM jfloff/alpine-python:2.7-slim
  2. MAINTAINER Martin Donath <martin.donath@squidfunk.com>
  3. # Set build directory
  4. WORKDIR /tmp
  5. # Install dependencies
  6. COPY requirements.txt .
  7. RUN \
  8. pip install -r requirements.txt && \
  9. rm requirements.txt
  10. # Copy files necessary for build
  11. COPY material material
  12. COPY MANIFEST.in MANIFEST.in
  13. COPY package.json package.json
  14. COPY setup.py setup.py
  15. # Perform build and cleanup artifacts
  16. RUN \
  17. python setup.py install && \
  18. rm -rf /tmp/* && \
  19. pip install mkdocs-mermaid2-plugin
  20. # Set working directory
  21. WORKDIR /docs
  22. # Expose MkDocs development server port
  23. EXPOSE 8000
  24. # Start development server by default
  25. ENTRYPOINT ["mkdocs"]
  26. CMD ["serve", "--dev-addr=0.0.0.0:8000"]