将pip安装步骤移至文件复制操作之后,确保依赖项正确安装。同时添加README.md到构建上下文
@@ -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