# 使用精简镜像 FROM python:3.10-slim # 创建工作目录 WORKDIR /app # 拷贝程序文件 COPY . /app/ # 安装相关依赖 RUN pip install --no-cache-dir -r requirements.txt # 暴露端口 EXPOSE 5000 # 指定应用程序入口 CMD ["python", "main.py"]