فهرست منبع

build(backend): 优化Dockerfile构建顺序

将pip安装步骤移至文件复制操作之后,确保依赖项正确安装。同时添加README.md到构建上下文
DengPeng 2 هفته پیش
والد
کامیت
847a141304
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      Dockerfile.backend

+ 3 - 3
Dockerfile.backend

@@ -25,13 +25,13 @@ RUN echo 'deb http://mirrors.aliyun.com/debian/ bookworm main non-free contrib'
 
 RUN pip install --no-cache-dir --upgrade pip setuptools wheel
 
-COPY pyproject.toml ./
-
-RUN pip install .
+COPY pyproject.toml README.md ./
 
 COPY apps/ ./apps/
 COPY main.py ./
 
+RUN pip install .
+
 RUN mkdir -p /opt/maxkb-app/model/base /opt/maxkb-app/tmp /opt/maxkb-app/logs
 
 COPY start.sh /opt/maxkb-app/start.sh