ACSimBot / Dockerfile
TonyD365's picture
Update Dockerfile
b354cef verified
Raw
History Blame Contribute Delete
659 Bytes
FROM python:3.11-slim
WORKDIR /app
# 1. 基础系统依赖:ca-certificates 是访问 Google DNS (HTTPS) 的核心
# 额外安装 dnsutils 方便你在 Logs 调试时查看网络状态
RUN apt-get update && apt-get install -y \
ca-certificates \
dnsutils \
&& rm -rf /var/lib/apt/lists/*
# 2. 安装 Python 依赖
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 3. 复制代码
COPY . .
# 4. 暴露 Hugging Face 必须的端口
EXPOSE 7860
# 5. 启动程序
# 删除了之前的 CMD 预检指令,直接启动 app.py
# 因为 DnsManager 会在 Python 内部接管所有的域名解析
CMD ["python", "app.py"]