From 0311e9564dd6409f7ae6e1b7276347532d5cf65d Mon Sep 17 00:00:00 2001 From: kiss2u Date: Tue, 5 Nov 2024 14:31:18 +0800 Subject: [PATCH] Update Dockerfile --- Dockerfile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 11a2348..1ed160a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,14 +7,19 @@ WORKDIR /app # 复制项目文件到容器 COPY . /app -# 安装依赖 +# 安装必要的系统依赖 RUN apt-get update && apt-get install -y \ build-essential \ libssl-dev \ libffi-dev \ python3-dev \ - && pip install --upgrade pip \ - && pip install --no-cache-dir -r requirements.txt + && rm -rf /var/lib/apt/lists/* + +# 升级 pip +RUN pip install --upgrade pip + +# 安装 Python 依赖 +RUN pip install --no-cache-dir -r requirements.txt 2>&1 | tee /app/pip_install_log.txt # 暴露端口 EXPOSE 8080