{"record":{"id":"840ebf586580fcd6","repo":"can1357/oh-my-pi","slug":"docker-not-found-on-path-required-to-run-task-con","errorCode":null,"errorMessage":"docker not found on PATH (required to run task containers).","messagePattern":"docker not found on PATH \\(required to run task containers\\)\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/metaharness/src/runner.ts","lineNumber":1546,"sourceCode":"// ──────────────────────────────────────────────────────────────────────── main\n\ninterface BenchmarkRun {\n\texitCode: number;\n\tjobName: string;\n\tjobDir: string;\n\tbenchDir: string;\n\ttarball: string | null;\n\telapsedMs: number;\n\ttotals: Totals | null;\n\treportPath: string | null;\n}\n\nasync function runBenchmark(cfg: Config): Promise<BenchmarkRun> {\n\tif (!which(\"harbor\")) {\n\t\tthrow new Error(\"harbor not found on PATH. Install with: uv tool install harbor\");\n\t}\n\tif (cfg.agent === \"omp\" && cfg.envType === \"docker\" && !which(\"docker\")) {\n\t\tthrow new Error(\"docker not found on PATH (required to run task containers).\");\n\t}\n\tif (cfg.envType === \"apple-container\" && !which(\"container\")) {\n\t\tthrow new Error(\n\t\t\t\"Apple 'container' CLI not found. Install with: brew install container && container system start\",\n\t\t);\n\t}\n\n\tconst stamp = new Date().toISOString().replace(/[:.]/g, \"-\").slice(0, 19);\n\tconst modelSlug = (cfg.models[0] ?? \"model\").replace(/[^a-zA-Z0-9]+/g, \"-\");\n\tconst jobName = cfg.jobName ?? `${modelSlug}-${stamp}`;\n\tconst jobDir = path.join(cfg.jobsDir, jobName);\n\tconst benchDir = path.join(cfg.jobsDir, \"_bench\", jobName);\n\tfs.mkdirSync(benchDir, { recursive: true });\n\tif (!cfg.resume && !cfg.dryRun) {\n\t\t// Snapshot the resolved launch config so a later `--resume <job>` can\n\t\t// rebuild the exact same invocation without re-specifying flags.\n\t\tfs.writeFileSync(path.join(benchDir, \"runner-config.json\"), JSON.stringify({ ...cfg, jobName }, null, \"\\t\"));\n\t}","sourceCodeStart":1528,"sourceCodeEnd":1564,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/metaharness/src/runner.ts#L1528-L1564","documentation":"When the benchmark agent is 'omp' and the environment type is 'docker', runBenchmark() requires the `docker` CLI because task containers are run through Docker. If `which('docker')` finds nothing it throws this message before the run starts. It is a preflight check guaranteeing the container runtime the selected envType needs is present.","triggerScenarios":"Starting a benchmark with `--env docker` (or the equivalent Config with envType 'docker' and agent 'omp') on a machine without the docker CLI, or where docker exists only in another user's/venv PATH.","commonSituations":"Docker Desktop uninstalled or never installed; running inside a slim CI image without the docker CLI; using podman only (no `docker` shim); PATH not including /usr/local/bin or Docker Desktop's bin dir.","solutions":["Install Docker (Docker Desktop, or `apt-get install docker-cli` / engine for your distro)","Verify with `which docker` and `docker ps` in the launching shell","If you meant a different backend, select the matching envType (e.g. apple-container) instead of docker","Fix PATH so the docker binary's directory is included for the process running the harness"],"exampleFix":"// before\n$ omp benchmark --env docker ...\ndocker not found on PATH (required to run task containers).\n// after\n$ which docker || brew install --cask docker  # then start Docker Desktop\n$ omp benchmark --env docker ...","handlingStrategy":"validation","validationCode":"import { spawnSync } from \"node:child_process\";\nif (cfg.agent === \"omp\" && cfg.envType === \"docker\" && spawnSync(\"which\", [\"docker\"]).status !== 0) {\n  throw new Error(\"Install Docker before running docker-env benchmarks\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  await runBenchmark(cfg);\n} catch (err) {\n  if (err instanceof Error && err.message.includes(\"docker not found on PATH\")) {\n    console.error(\"Install Docker Desktop or docker-cli, start the daemon, and retry.\");\n  } else throw err;\n}","preventionTips":["Install the docker CLI (Docker Desktop or distro package) before running docker-env benchmarks","Preflight `which docker && docker ps` in CI before the job","Use a CI image that includes the docker CLI (or docker-in-docker sidecar)","Keep Docker Desktop's bin directory on PATH (default /usr/local/bin)"],"tags":["docker","cli","environment","missing-binary"],"backgroundTag":"binary-not-on-path","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}