# 使用一个更轻量级的基础镜像 FROM python:3.11-slim # 设置工作目录 WORKDIR /app # 安装 git 和清理缓存,减少图层 RUN apt update && \ apt install -y git && \ rm -rf /var/lib/apt/lists/* # 克隆代码库 RUN git clone https://github.com/zhile-io/pandora-cloud-serverless.git /app # 安装 Python 依赖 RUN pip install --no-cache-dir -r requirements.txt # 暴露端口 EXPOSE 8018 # 设置启动命令 CMD ["python", "main.py"]