release.dockerfile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. FROM python:3.11-slim as builder
  2. RUN apt-get update && \
  3. DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \
  4. apt-get install -y --no-install-recommends \
  5. build-essential \
  6. && rm -rf /var/lib/apt/lists/* \
  7. && apt-get clean
  8. RUN python -m pip install --upgrade pip
  9. RUN python -m pip install --upgrade libsass
  10. FROM python:3.11-slim as release
  11. COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
  12. ARG VERSION
  13. LABEL maintainer="Zauberzeug GmbH <info@zauberzeug.com>"
  14. RUN python -m pip install --upgrade pip
  15. RUN python -m pip install \
  16. nicegui[plotly,matplotlib]==$VERSION \
  17. docutils \
  18. isort \
  19. itsdangerous \
  20. pytest \
  21. requests \
  22. selenium
  23. WORKDIR /app
  24. COPY main.py README.md prometheus.py ./
  25. COPY examples ./examples
  26. COPY website ./website
  27. RUN mkdir /resources
  28. COPY docker-entrypoint.sh /resources
  29. RUN chmod 777 /resources/docker-entrypoint.sh
  30. EXPOSE 8080
  31. ENV PYTHONUNBUFFERED True
  32. ENTRYPOINT ["/resources/docker-entrypoint.sh"]
  33. CMD ["python", "main.py"]