Skip to content

Commit 67c6709

Browse files
committed
fix build error
1 parent 6ce9e32 commit 67c6709

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4040
build-essential \
4141
curl \
4242
gcc \
43+
pkg-config \
44+
libssl-dev \
45+
libffi-dev \
46+
python3-dev \
47+
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
4348
&& rm -rf /var/lib/apt/lists/*
4449

4550
# 创建虚拟环境并安装 Python 依赖
4651
WORKDIR /app
4752
COPY backend/requirements.txt requirements.txt
4853
RUN python3 -m venv ${VENV_PATH} \
49-
&& pip install --upgrade pip \
50-
&& pip install -r requirements.txt \
51-
&& rm -rf /root/.cache
54+
&& /root/.cargo/bin/rustc --version \
55+
&& PATH="/root/.cargo/bin:$PATH" pip install --upgrade pip \
56+
&& PATH="/root/.cargo/bin:$PATH" pip install -r requirements.txt \
57+
&& rm -rf /root/.cache /root/.cargo
5258

5359
# 最终运行阶段
5460
FROM prepare_package AS final

0 commit comments

Comments
 (0)