FROM python:3.11-slim # 安装 git 以便克隆仓库 RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/* # 设置工作目录 WORKDIR /app # 克隆指定的代码库到当前目录 RUN git clone https://github.com/Starry-Sky-World/EasyAuth-Bot.git . # 安装依赖 RUN pip install --no-cache-dir -r requirements.txt # 复制启动脚本到容器中 COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh # 暴露 Hugging Face 要求的 7860 端口 EXPOSE 7860 # 运行启动脚本 ENTRYPOINT ["/entrypoint.sh"]