Skip to content

Commit 5dc69c6

Browse files
committed
fix
1 parent ed3b69f commit 5dc69c6

1 file changed

Lines changed: 32 additions & 32 deletions

File tree

Dockerfile

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ FROM alpine:3.18 AS builder
77

88
# 安装构建依赖
99
RUN apk add --no-cache \
10-
python3 \
11-
python3-dev \
12-
gcc \
13-
musl-dev \
14-
libffi-dev \
15-
rust \
16-
cargo \
17-
curl
10+
python3 \
11+
python3-dev \
12+
gcc \
13+
musl-dev \
14+
libffi-dev \
15+
rust \
16+
cargo \
17+
curl
1818

1919
# 安装 uv
2020
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
@@ -33,38 +33,38 @@ RUN uv sync --frozen --no-dev
3333
FROM alpine:3.18 AS runtime
3434

3535
ENV LANG="C.UTF-8" \
36-
TZ=Asia/Shanghai \
37-
PUID=1000 \
38-
PGID=1000 \
39-
UMASK=022 \
40-
PATH="/root/.local/bin:$PATH"
36+
TZ=Asia/Shanghai \
37+
PUID=1000 \
38+
PGID=1000 \
39+
UMASK=022 \
40+
PATH="/root/.local/bin:$PATH"
4141

4242
WORKDIR /app
4343

4444
# 只安装运行时依赖
4545
RUN set -ex && \
46-
apk add --no-cache \
47-
bash \
48-
busybox-suid \
49-
python3 \
50-
py3-aiohttp \
51-
py3-bcrypt \
52-
curl \
53-
su-exec \
54-
shadow \
55-
tini \
56-
openssl \
57-
tzdata && \
58-
# 添加用户
59-
mkdir -p /home/ab && \
60-
addgroup -S ab -g 911 && \
61-
adduser -S ab -G ab -h /home/ab -s /sbin/nologin -u 911 && \
62-
# 清理缓存
63-
rm -rf /var/cache/apk/* /tmp/*
46+
apk add --no-cache \
47+
bash \
48+
busybox-suid \
49+
python3 \
50+
py3-aiohttp \
51+
py3-bcrypt \
52+
curl \
53+
su-exec \
54+
shadow \
55+
tini \
56+
openssl \
57+
tzdata && \
58+
# 添加用户
59+
mkdir -p /home/ab && \
60+
addgroup -S ab -g 911 && \
61+
adduser -S ab -G ab -h /home/ab -s /sbin/nologin -u 911 && \
62+
# 清理缓存
63+
rm -rf /var/cache/apk/* /tmp/*
6464

6565
# 从构建阶段复制虚拟环境
6666
# COPY --from=builder $VENV_PATH $VENV_PATH
67-
COPY --from=builder /app/.venv /app/.venv
67+
COPY --from=builder /build/.venv /app/.venv
6868

6969
# 复制应用代码(放在最后,因为代码变更最频繁)
7070
COPY --chmod=755 backend/src/. ./src

0 commit comments

Comments
 (0)