From e1795256d5a27b56e9e9284d1897007ae46332bd Mon Sep 17 00:00:00 2001 From: sallyom Date: Tue, 12 May 2026 00:13:15 -0400 Subject: [PATCH] fix(docker): avoid external Dockerfile frontend pull Signed-off-by: sallyom --- Dockerfile | 2 -- scripts/docker/sandbox/Dockerfile | 2 -- src/dockerfile.test.ts | 8 ++++++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 09f109a0436e..8884ff8027a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,3 @@ -# syntax=docker/dockerfile:1.7 - # Opt-in plugin dependencies at build time (space- or comma-separated directory names). # Example: docker build --build-arg OPENCLAW_EXTENSIONS="diagnostics-otel,matrix" . # diff --git a/scripts/docker/sandbox/Dockerfile b/scripts/docker/sandbox/Dockerfile index a65dcee6e83a..2c283ae2dca3 100644 --- a/scripts/docker/sandbox/Dockerfile +++ b/scripts/docker/sandbox/Dockerfile @@ -1,5 +1,3 @@ -# syntax=docker/dockerfile:1.7 - FROM debian:bookworm-slim@sha256:f9c6a2fd2ddbc23e336b6257a5245e31f996953ef06cd13a59fa0a1df2d5c252 ENV DEBIAN_FRONTEND=noninteractive diff --git a/src/dockerfile.test.ts b/src/dockerfile.test.ts index 3f749b8a21b4..e5e9fca600a2 100644 --- a/src/dockerfile.test.ts +++ b/src/dockerfile.test.ts @@ -7,6 +7,7 @@ import YAML from "yaml"; const repoRoot = resolve(fileURLToPath(new URL(".", import.meta.url)), ".."); const dockerfilePath = join(repoRoot, "Dockerfile"); +const dockerSetupDockerfilePaths = ["Dockerfile", "scripts/docker/sandbox/Dockerfile"] as const; const pnpmWorkspacePath = join(repoRoot, "pnpm-workspace.yaml"); function collapseDockerContinuations(dockerfile: string): string { @@ -14,6 +15,13 @@ function collapseDockerContinuations(dockerfile: string): string { } describe("Dockerfile", () => { + it("does not force an external Dockerfile frontend pull", async () => { + for (const path of dockerSetupDockerfilePaths) { + const dockerfile = await readFile(join(repoRoot, path), "utf8"); + expect(dockerfile, path).not.toMatch(/^#\s*syntax=/m); + } + }); + it("uses full bookworm for build stages and slim bookworm for runtime", async () => { const dockerfile = await readFile(dockerfilePath, "utf8"); expect(dockerfile).toContain(