{"record":{"id":"d5e6a00fcef809a8","repo":"coleam00/Archon","slug":"no-such-image-image-build-the-runner-image","errorCode":null,"errorMessage":"No such image: '${image}'. Build the runner image first: docker build -t ${image} -f packages/isolation/docker/runner.Dockerfile packages/isolation/docker (${detail})","messagePattern":"No such image: '(.+?)'\\. Build the runner image first: docker build -t (.+?) -f packages/isolation/docker/runner\\.Dockerfile packages/isolation/docker \\((.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/isolation/src/container/docker-exec.ts","lineNumber":111,"sourceCode":"    // \"is Docker running?\" (see deployment/docker.md; the socket is root-equivalent).\n    const dockerizedHint =\n      process.env.ARCHON_DOCKER === 'true'\n        ? ' Archon is running inside Docker, which does not mount the Docker daemon socket — ' +\n          'the --container backend is unavailable in a dockerized deploy. Run Archon directly ' +\n          'on the host, or see deployment/docker.md.'\n        : '';\n    throw new Error(\n      `Cannot connect to the Docker daemon. Is Docker running?${dockerizedHint} (${detail})`\n    );\n  }\n\n  // 2. Runner image present locally. We never auto-pull — the image is built\n  //    from the in-repo Dockerfile, so a miss means \"build it\", not \"pull it\".\n  try {\n    await runner(['image', 'inspect', image], { timeout: 15_000 });\n  } catch (err) {\n    const detail = extractDockerError(err);\n    throw new Error(\n      `No such image: '${image}'. Build the runner image first: ` +\n        `docker build -t ${image} -f packages/isolation/docker/runner.Dockerfile packages/isolation/docker (${detail})`\n    );\n  }\n}\n\n/**\n * Pull the best available error text off a rejected `execFile` promise: the\n * child's stderr if present, else the error message. Used to enrich preflight\n * errors and to feed `classifyIsolationError`.\n */\nexport function extractDockerError(err: unknown): string {\n  const e = err as Error & { stderr?: string; stdout?: string };\n  const stderr = (e.stderr ?? '').trim();\n  if (stderr) return stderr.split('\\n')[0] ?? stderr;\n  return (e.message ?? String(err)).split('\\n')[0] ?? String(err);\n}\n","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/coleam00/Archon/blob/0773b9745896ef0612e709c80845a0f7db315b19/packages/isolation/src/container/docker-exec.ts#L93-L129","documentation":"dockerPreflight checks that the runner image exists locally. The library never auto-pulls because the image is built from the in-repo Dockerfile, so a missing image is treated as a build step the user skipped, and this error spells out the exact build command.","triggerScenarios":"Calling prepare()/p() with the container backend before ever building the runner image, or after pruning images (`docker image prune -a`).","commonSituations":"Fresh clone where the setup step was skipped; image removed by disk cleanup; image tag changed by a version bump so the old tag no longer exists.","solutions":["Build the runner image: docker build -t <image> -f packages/isolation/docker/runner.Dockerfile packages/isolation/docker","Re-run the repo setup script if one exists (check package.json)","If a version bump renamed the tag, rebuild/pull the new tagged image"],"exampleFix":"// before\narchon --container ...   # fails: image not built\n// after\ndocker build -t archon-runner -f packages/isolation/docker/runner.Dockerfile packages/isolation/docker\narchon --container ...","handlingStrategy":"validation","validationCode":"import { execFile } from 'child_process';\nfunction imageExists(image: string): Promise<boolean> {\n  return new Promise(res => execFile('docker', ['image', 'inspect', image], err => res(!err)));\n}\nif (!(await imageExists('archon-runner'))) {\n  console.error('Build it: docker build -t archon-runner -f packages/isolation/docker/runner.Dockerfile packages/isolation/docker');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await backend.prepare(opts);\n} catch (err) {\n  if (String(err).startsWith(\"No such image: '\")) {\n    // build the runner image per the message, then retry once\n  }\n  throw err;\n}","preventionTips":["Build the runner image after cloning and after pulling changes","Avoid `docker image prune -a` removing the runner tag","Rebuild when the repo bumps the image tag"],"tags":["docker","image","missing"],"backgroundTag":"docker-image-not-found","analyzedSha":"0773b9745896ef0612e709c80845a0f7db315b19","analyzedAt":"2026-09-01T02:28:07.064Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}