


























@@ -222,6 +222,7 @@ describe("scripts/docker/setup.sh", () => {
222222expect(envFile).toContain("OPENCLAW_DOCKER_APT_PACKAGES=ffmpeg build-essential");
223223expect(envFile).toContain("OPENCLAW_EXTRA_MOUNTS=");
224224expect(envFile).toContain("OPENCLAW_HOME_VOLUME=openclaw-home"); // pragma: allowlist secret
225+expect(envFile).toContain("OPENCLAW_DISABLE_BONJOUR=1");
225226const extraCompose = await readFile(
226227join(activeSandbox.rootDir, "docker-compose.extra.yml"),
227228"utf8",
@@ -240,6 +241,18 @@ describe("scripts/docker/setup.sh", () => {
240241expect(log).not.toContain("run --rm openclaw-cli onboard --mode local --no-install-daemon");
241242});
242243244+it("persists explicit Docker Bonjour opt-in overrides", async () => {
245+const activeSandbox = requireSandbox(sandbox);
246+247+const result = runDockerSetup(activeSandbox, {
248+OPENCLAW_DISABLE_BONJOUR: "0",
249+});
250+251+expect(result.status).toBe(0);
252+const envFile = await readFile(join(activeSandbox.rootDir, ".env"), "utf8");
253+expect(envFile).toContain("OPENCLAW_DISABLE_BONJOUR=0");
254+});
255+243256it("avoids shared-network openclaw-cli before the gateway is started", async () => {
244257const activeSandbox = requireSandbox(sandbox);
245258@@ -534,6 +547,13 @@ describe("scripts/docker/setup.sh", () => {
534547expect(compose).toContain('"gateway"');
535548});
536549550+it("keeps docker-compose gateway Bonjour advertising disabled by default", async () => {
551+const compose = await readFile(join(repoRoot, "docker-compose.yml"), "utf8");
552+expect(
553+compose.match(/OPENCLAW_DISABLE_BONJOUR: \$\{OPENCLAW_DISABLE_BONJOUR:-1\}/g),
554+).toHaveLength(1);
555+});
556+537557it("keeps docker-compose CLI network namespace settings in sync", async () => {
538558const compose = await readFile(join(repoRoot, "docker-compose.yml"), "utf8");
539559expect(compose).toContain('network_mode: "service:openclaw-gateway"');
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。