-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
33 lines (24 loc) · 850 Bytes
/
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
FROM python:3.12-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
# NiceGUI 1.4.20 - Make libsass optional
# RUN python -m pip install --upgrade libsass
RUN python -m pip install --upgrade cffi
FROM python:3.12-slim AS release
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
LABEL maintainer="Henry Zhu <daya0576@gmail.com>"
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY start.sh .
COPY beaverhabits ./beaverhabits
COPY statics ./statics
RUN chmod -R g+w /app && \
chown -R nobody /app
USER nobody
CMD ["sh", "start.sh", "prd"]