惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
罗磊的独立博客
量子位
Microsoft Azure Blog
Microsoft Azure Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
M
MIT News - Artificial intelligence
月光博客
月光博客
IT之家
IT之家
D
DataBreaches.Net
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
D
Docker
The GitHub Blog
The GitHub Blog
B
Blog
V
Visual Studio Blog
博客园 - Franky
N
Netflix TechBlog - Medium
博客园 - 【当耐特】
Martin Fowler
Martin Fowler
博客园 - 聂微东
U
Unit 42

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat(docker): add image apt package build arg · openclaw/...
urtabajev · 2026-05-18 · via Recent Commits to openclaw:main

@@ -258,13 +258,13 @@ describe("scripts/docker/setup.sh", () => {

258258

const activeSandbox = requireSandbox(sandbox);

259259260260

const result = runDockerSetup(activeSandbox, {

261-

OPENCLAW_DOCKER_APT_PACKAGES: "ffmpeg build-essential",

261+

OPENCLAW_DOCKER_APT_PACKAGES: "curl wget",

262262

OPENCLAW_EXTRA_MOUNTS: undefined,

263263

OPENCLAW_HOME_VOLUME: "openclaw-home",

264264

});

265265

expect(result.status).toBe(0);

266266

const envFile = await readFile(join(activeSandbox.rootDir, ".env"), "utf8");

267-

expect(envFile).toContain("OPENCLAW_DOCKER_APT_PACKAGES=ffmpeg build-essential");

267+

expect(envFile).toContain("OPENCLAW_IMAGE_APT_PACKAGES=curl wget");

268268

expect(envFile).toContain("OPENCLAW_EXTRA_MOUNTS=");

269269

expect(envFile).toContain("OPENCLAW_HOME_VOLUME=openclaw-home"); // pragma: allowlist secret

270270

expect(envFile).toContain("OPENCLAW_DISABLE_BONJOUR=");

@@ -282,7 +282,7 @@ describe("scripts/docker/setup.sh", () => {

282282

expect(extraCompose).toContain("volumes:");

283283

expect(extraCompose).toContain("openclaw-home:");

284284

const log = await readDockerLog(activeSandbox);

285-

expect(log).toContain("--build-arg OPENCLAW_DOCKER_APT_PACKAGES=ffmpeg build-essential");

285+

expect(log).toContain("--build-arg OPENCLAW_IMAGE_APT_PACKAGES=curl wget");

286286

expect(log).toContain(

287287

`run --rm --no-deps ${prestartContainerEnvFlags} --entrypoint node openclaw-gateway dist/index.js onboard --mode local --no-install-daemon`,

288288

);

@@ -304,6 +304,61 @@ describe("scripts/docker/setup.sh", () => {

304304

expect(envFile).toContain("OPENCLAW_DISABLE_BONJOUR=0");

305305

});

306306307+

it("normalizes legacy OPENCLAW_DOCKER_APT_PACKAGES into OPENCLAW_IMAGE_APT_PACKAGES", async () => {

308+

const activeSandbox = requireSandbox(sandbox);

309+

await resetDockerLog(activeSandbox);

310+311+

const result = runDockerSetup(activeSandbox, {

312+

OPENCLAW_DOCKER_APT_PACKAGES: "curl wget",

313+

});

314+

expect(result.status).toBe(0);

315+316+

const envFile = await readFile(join(activeSandbox.rootDir, ".env"), "utf8");

317+

expect(envFile).toContain("OPENCLAW_IMAGE_APT_PACKAGES=curl wget");

318+

expect(envFile).not.toContain("OPENCLAW_DOCKER_APT_PACKAGES");

319+320+

const log = await readDockerLog(activeSandbox);

321+

expect(log).toContain("--build-arg OPENCLAW_IMAGE_APT_PACKAGES=curl wget");

322+

expect(log).not.toContain("--build-arg OPENCLAW_DOCKER_APT_PACKAGES");

323+

});

324+325+

it("prefers OPENCLAW_IMAGE_APT_PACKAGES over legacy OPENCLAW_DOCKER_APT_PACKAGES", async () => {

326+

const activeSandbox = requireSandbox(sandbox);

327+

await resetDockerLog(activeSandbox);

328+329+

const result = runDockerSetup(activeSandbox, {

330+

OPENCLAW_IMAGE_APT_PACKAGES: "curl wget httpie",

331+

OPENCLAW_DOCKER_APT_PACKAGES: "curl wget",

332+

});

333+

expect(result.status).toBe(0);

334+335+

const envFile = await readFile(join(activeSandbox.rootDir, ".env"), "utf8");

336+

expect(envFile).toContain("OPENCLAW_IMAGE_APT_PACKAGES=curl wget httpie");

337+

expect(envFile).not.toContain("OPENCLAW_DOCKER_APT_PACKAGES");

338+339+

const log = await readDockerLog(activeSandbox);

340+

expect(log).toContain("--build-arg OPENCLAW_IMAGE_APT_PACKAGES=curl wget httpie");

341+

expect(log).not.toMatch(/--build-arg OPENCLAW_IMAGE_APT_PACKAGES=curl wget(?! httpie)/);

342+

});

343+344+

it("explicitly empty OPENCLAW_IMAGE_APT_PACKAGES suppresses legacy fallback", async () => {

345+

const activeSandbox = requireSandbox(sandbox);

346+

await resetDockerLog(activeSandbox);

347+348+

const result = runDockerSetup(activeSandbox, {

349+

OPENCLAW_IMAGE_APT_PACKAGES: "",

350+

OPENCLAW_DOCKER_APT_PACKAGES: "curl wget",

351+

});

352+

expect(result.status).toBe(0);

353+354+

const envFile = await readFile(join(activeSandbox.rootDir, ".env"), "utf8");

355+

expect(envFile).toContain("OPENCLAW_IMAGE_APT_PACKAGES=");

356+

expect(envFile).not.toContain("curl wget");

357+358+

const log = await readDockerLog(activeSandbox);

359+

expect(log).not.toContain("--build-arg OPENCLAW_IMAGE_APT_PACKAGES=curl wget");

360+

});

361+307362

it("avoids shared-network openclaw-cli before the gateway is started", async () => {

308363

const activeSandbox = requireSandbox(sandbox);

309364

@@ -742,4 +797,19 @@ describe("scripts/docker/setup.sh", () => {

742797

compose.match(/OPENCLAW_WORKSPACE_DIR: \/home\/node\/\.openclaw\/workspace$/gm),

743798

).toHaveLength(2);

744799

});

800+801+

it("Dockerfile ARG OPENCLAW_IMAGE_APT_PACKAGES must not have a default value", async () => {

802+

// If the ARG has a default (e.g. ARG OPENCLAW_IMAGE_APT_PACKAGES=""), Docker treats it as

803+

// "set" even when no --build-arg is passed. That breaks the RUN fallback expression

804+

// ${OPENCLAW_IMAGE_APT_PACKAGES-$OPENCLAW_DOCKER_APT_PACKAGES} because the variable is

805+

// never truly unset, so legacy-only callers using --build-arg OPENCLAW_DOCKER_APT_PACKAGES

806+

// get nothing installed — a backward-compat regression.

807+

const dockerfile = await readFile(join(repoRoot, "Dockerfile"), "utf8");

808+

const argLine = dockerfile

809+

.split("\n")

810+

.find((line) => line.startsWith("ARG OPENCLAW_IMAGE_APT_PACKAGES"));

811+

expect(argLine).toBeDefined();

812+

// Must be bare `ARG OPENCLAW_IMAGE_APT_PACKAGES` with no default assignment

813+

expect(argLine).toBe("ARG OPENCLAW_IMAGE_APT_PACKAGES");

814+

});

745815

});