Go to file
caoqianming ae15a36e58 init.sh: 覆写 /etc/resolv.conf 绕过 docker embedded DNS
发现 user-defined bridge network 上 docker run --dns 是改 daemon 给 embedded
DNS(127.0.0.11)的上游 forward 目标,容器 /etc/resolv.conf 不变(仍是
nameserver 127.0.0.11)。腾讯云轻量等场景 daemon 探测 systemd-resolved 上游
失败 → embedded DNS 自身 forward 也跪 → --dns 8.8.8.8 救不了。

正确解:init.sh 启动时直接覆写 /etc/resolv.conf,完全绕过 embedded DNS。
- pool.py 把 --dns flag 换成 -e ZCBOT_DNS=8.8.8.8,114.114.114.114
- init.sh apply_resolv_conf 函数循环 echo "nameserver $ip" > /etc/resolv.conf
- /etc/resolv.conf 是 docker bind mount file(非 rootfs),--read-only 不挡,
  root 跑 init.sh 可写;--restart=no 容器生命周期内不被 docker 覆盖

iptables 127.0.0.11 ACCEPT 例外保留不动(无副作用,以备未来需要 service
discovery 等场景)。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 12:03:24 +08:00
config sandbox: yaml sandbox.dns 显式 --dns 注入(绕开 daemon 上游探测) 2026-05-27 11:28:53 +08:00
core init.sh: 覆写 /etc/resolv.conf 绕过 docker embedded DNS 2026-05-27 12:03:24 +08:00
db/migrations Stage C 收尾包:资源 yaml + 磁盘配额 + 网络放开 + 容器内源持久化 2026-05-27 08:35:53 +08:00
deploy/sandbox init.sh: 覆写 /etc/resolv.conf 绕过 docker embedded DNS 2026-05-27 12:03:24 +08:00
prompts/system feat(paths): 对外路径统一全形式 <wd_name>/<rel> + UI 一次性兼容历史简写 2026-05-22 12:45:54 +08:00
scripts feat(seedance): 加 seedance_2_pro variant + smoke 支持 --variant 参数 2026-05-22 10:11:31 +08:00
skills Stage C Step 3 hotfix: exec_user 跟随 build_arg + 镜像装 mermaid-cli 2026-05-26 21:47:33 +08:00
tests Stage C 收尾包:资源 yaml + 磁盘配额 + 网络放开 + 容器内源持久化 2026-05-27 08:35:53 +08:00
tools Add web_search and web_fetch tools via Bocha AI search API 2026-05-25 11:37:33 +08:00
web Stage C 收尾包:资源 yaml + 磁盘配额 + 网络放开 + 容器内源持久化 2026-05-27 08:35:53 +08:00
.gitattributes Add .gitattributes: force LF for shell + Dockerfile 2026-05-26 10:45:17 +08:00
.gitignore skills+core(命名约定): task 级宪法文件 <date>-<short_id>-<name>.spec.md + spec_lock → spec 简化 2026-05-20 14:03:21 +08:00
CLAUDE.md ui(media): tool 结果与 assistant 正文同路径 chip/inline 图去重 — Set O(n) + CLAUDE.md 加 "实施前先对方案" 段 2026-05-20 16:33:47 +08:00
DESIGN.md Stage C Step 3d: fs 工具进容器 + DESIGN §7.5 #6 重写(物理边界替代代码护栏) 2026-05-26 21:56:41 +08:00
DOCUMENT_SEARCH_API.md feat(skill): documents skill 接内部材料学科知识库(document_search API) 2026-05-21 15:31:21 +08:00
EMBED.md feat(web): embed 模式接受 ?task_id=<uuid> URL 参数自动定位 task 2026-05-22 15:27:19 +08:00
PROGRESS.md Stage C 收尾包:资源 yaml + 磁盘配额 + 网络放开 + 容器内源持久化 2026-05-27 08:35:53 +08:00
RUN.md sandbox: yaml sandbox.dns 显式 --dns 注入(绕开 daemon 上游探测) 2026-05-27 11:28:53 +08:00
alembic.ini core(§7 B Step 1): Storage 基建 — SQLAlchemy ORM + alembic + db CLI 2026-05-14 10:41:44 +08:00
main.py Stage C Step 5: main.py sandbox check + lifespan fs quota WARN 2026-05-26 16:41:16 +08:00
requirements.txt Add web_search and web_fetch tools via Bocha AI search API 2026-05-25 11:37:33 +08:00