File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ ENV LANG="C.UTF-8" \
66 TZ=Asia/Shanghai \
77 PUID=1000 \
88 PGID=1000 \
9- UMASK=022
9+ UMASK=022 \
10+ PATH="/root/.local/bin:$PATH"
1011
1112WORKDIR /app
1213
@@ -18,27 +19,44 @@ RUN set -ex && \
1819 bash \
1920 busybox-suid \
2021 python3 \
22+ python3-dev \
2123 py3-aiohttp \
2224 py3-bcrypt \
2325 curl \
26+ gcc \
27+ musl-dev \
28+ libffi-dev \
2429 su-exec \
2530 shadow \
2631 tini \
2732 openssl \
28- tzdata && \
33+ tzdata \
34+ rust \
35+ cargo && \
2936 # Install uv
3037 curl -LsSf https://astral.sh/uv/install.sh | sh && \
31- . $HOME/.cargo/env && \
38+ # Verify uv installation and show version
39+ uv --version && \
40+ # Check if lock file exists and is readable
41+ ls -la uv.lock && \
3242 # Install dependencies using uv
3343 uv sync --frozen --no-dev && \
44+ # Remove build dependencies to reduce image size
45+ apk del \
46+ rust \
47+ cargo \
48+ gcc \
49+ musl-dev \
50+ libffi-dev \
51+ python3-dev && \
3452 # Add user
3553 mkdir -p /home/ab && \
3654 addgroup -S ab -g 911 && \
3755 adduser -S ab -G ab -h /home/ab -s /sbin/nologin -u 911 && \
3856 # Clear
3957 rm -rf \
4058 /root/.cache \
41- /root/.cargo \
59+ /root/.local \
4260 /tmp/*
4361
4462COPY --chmod=755 backend/src/. .
Original file line number Diff line number Diff line change @@ -12,4 +12,4 @@ usermod -o -u "${PUID}" ab
1212
1313chown ab:ab -R /app /home/ab
1414
15- exec su-exec " ${PUID} :${PGID} " python3 main.py
15+ exec su-exec " ${PUID} :${PGID} " /app/.venv/bin/python main.py
You can’t perform that action at this time.
0 commit comments