# 设置基础镜像 FROM python:3.9 # 设置工作目录 WORKDIR /app # 复制项目文件到工作目录 COPY . /app # 安装依赖 RUN pip install --no-cache-dir -r requirements.txt # 运行应用程序 CMD [ "python", "main.py" ]