forked from zauberzeug/nicegui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.dockerfile
37 lines (26 loc) · 972 Bytes
/
release.dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM python:3.11.3-slim as builder
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \
apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
RUN python -m pip install --upgrade pip
RUN python -m pip install --upgrade libsass
FROM python:3.11.3-slim as release
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
ARG VERSION
LABEL maintainer="Zauberzeug GmbH <[email protected]>"
RUN python -m pip install --upgrade pip
RUN python -m pip install nicegui==$VERSION itsdangerous isort docutils requests
WORKDIR /app
COPY main.py README.md prometheus.py ./
COPY examples ./examples
COPY website ./website
RUN mkdir /resources
COPY docker-entrypoint.sh /resources
RUN chmod 777 /resources/docker-entrypoint.sh
EXPOSE 8080
ENV PYTHONUNBUFFERED True
ENTRYPOINT ["/resources/docker-entrypoint.sh"]
CMD ["python", "main.py"]