FROM python:3.11-slim WORKDIR /app # 一次性复制所有文件 COPY . . # 设置镜像源 # RUN pip config set global.index-url https://repo.huaweicloud.com/repository/pypi/simple/ # 安装依赖 RUN pip install --no-cache-dir -r requirements.txt -i https://mirrors.cloud.tencent.com/pypi/simple/ EXPOSE 5190 CMD ["python", "app.py"]