{"record":{"id":"aba90227e262b0a1","repo":"heygen-com/hyperframes","slug":"failed-to-build-docker-image-message","errorCode":null,"errorMessage":"Failed to build Docker image: ${message}","messagePattern":"Failed to build Docker image: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/commands/render.ts","lineNumber":607,"sourceCode":"    execFileSync(\n      \"docker\",\n      [\n        \"build\",\n        \"--platform\",\n        platform,\n        \"--build-arg\",\n        `HYPERFRAMES_VERSION=${version}`,\n        \"--build-arg\",\n        `TARGETARCH=${targetArch}`,\n        \"-t\",\n        tag,\n        tmpDir,\n      ],\n      { stdio: quiet ? \"pipe\" : \"inherit\", timeout: 600_000 },\n    );\n  } catch (error: unknown) {\n    const message = normalizeErrorMessage(error);\n    throw new Error(`Failed to build Docker image: ${message}`);\n  } finally {\n    rmSync(tmpDir, { recursive: true, force: true });\n  }\n\n  if (!quiet) console.log(c.dim(`  Docker image: ${tag} (built)`));\n  return tag;\n}\n\n/**\n * Resolves the Docker `--platform` for this host and enforces the constraints\n * that come with it — keeping that policy out of `renderDocker` so the\n * orchestrator stays focused on build/run wiring. May terminate the process\n * via errorBox on unrecoverable mismatches (e.g. --gpu on arm64).\n */\nfunction resolveDockerHostPlatform(options: RenderOptions): string {\n  const platform = resolveDockerPlatform();\n\n  // Docker Desktop on Apple Silicon (and colima with VZ) doesn't implement","sourceCodeStart":589,"sourceCodeEnd":625,"githubUrl":"https://github.com/heygen-com/hyperframes/blob/c2996c8626135db5253519359d8a063d3bafad8d/packages/cli/src/commands/render.ts#L589-L625","documentation":"Thrown when the `docker build` invocation inside renderDocker exits non-zero. The underlying error is normalized into a message and wrapped so the caller sees a single actionable failure rather than a raw Node ENOENT/exit-code object. The temp build context is cleaned up in the finally block regardless of outcome.","triggerScenarios":"renderDocker runs `docker build` with version/arch build-args and a 600s timeout (stdio piped when quiet, inherited otherwise); any non-zero exit or timeout is caught at render.ts:607 and re-thrown.","commonSituations":"Docker daemon not running; disk full; a Dockerfile.render step fails (missing base image, network blocked from pulling images); build exceeded the 10-minute timeout; incorrect TARGETARCH build-arg; rate-limited registry.","solutions":["Read the normalized message — it usually contains docker's own error line","Ensure the Docker daemon is up: `docker info`","Re-run with quiet off to get inherited build output for full logs","Free disk space / prune Docker: `docker system prune`","Pre-pull the base image if your network is rate-limited"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import { execFileSync } from \"node:child_process\";\nfunction dockerDaemonUp(): boolean {\n  try { execFileSync(\"docker\", [\"info\"], { stdio: \"ignore\", timeout: 5000 }); return true; }\n  catch { return false; }\n}","typeGuard":null,"tryCatchPattern":"try {\n  await renderDocker({ ... });\n} catch (e) {\n  if (e.message.startsWith(\"Failed to build Docker image:\")) {\n    // inspect message, pre-pull base image, free disk, then retry non-quiet\n  }\n  throw e;\n}","preventionTips":["Pre-flight with `docker info` before invoking docker render","Run with quiet off the first time to capture full build logs","Pre-pull base images on rate-limited networks","Keep Docker disk headroom (prune periodically)"],"tags":["render","docker","build","external-dependency"],"backgroundTag":null,"analyzedSha":"c2996c8626135db5253519359d8a063d3bafad8d","analyzedAt":"2026-08-12T22:18:56.877Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}