mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 10:40:43 +00:00
fix(docker): normalize plugin build args
This commit is contained in:
@@ -105,9 +105,18 @@ describe("Dockerfile", () => {
|
||||
|
||||
it("prunes runtime dependencies after the build stage", async () => {
|
||||
const dockerfile = await readFile(dockerfilePath, "utf8");
|
||||
const normalizedExtensionLoop =
|
||||
"for ext in $(printf '%s\\n' \"$OPENCLAW_EXTENSIONS\" | tr ',' ' '); do \\";
|
||||
expect(dockerfile).toContain("FROM build AS runtime-assets");
|
||||
expect(dockerfile).toContain("ARG OPENCLAW_EXTENSIONS");
|
||||
expect(dockerfile).toContain("ARG OPENCLAW_BUNDLED_PLUGIN_DIR");
|
||||
expect(dockerfile).toContain(
|
||||
"Opt-in plugin dependencies at build time (space- or comma-separated directory names).",
|
||||
);
|
||||
expect(dockerfile).toContain(
|
||||
'Example: docker build --build-arg OPENCLAW_EXTENSIONS="diagnostics-otel,matrix" .',
|
||||
);
|
||||
expect(dockerfile.split(normalizedExtensionLoop).length - 1).toBe(2);
|
||||
expect(dockerfile).toContain("pnpm-workspace.runtime.yaml");
|
||||
expect(dockerfile).toContain(" - ui\\n");
|
||||
expect(dockerfile).toContain("CI=true NPM_CONFIG_FROZEN_LOCKFILE=false pnpm prune --prod");
|
||||
|
||||
Reference in New Issue
Block a user