Skip to content

Commit 34f24ec

Browse files
committed
fix
fix fix fix fix docker build
1 parent cb88c95 commit 34f24ec

2 files changed

Lines changed: 23 additions & 5 deletions

File tree

Dockerfile

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff 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

1112
WORKDIR /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

4462
COPY --chmod=755 backend/src/. .

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ usermod -o -u "${PUID}" ab
1212

1313
chown 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

0 commit comments

Comments
 (0)