{"record":{"id":"39121c1d90a78129","repo":"continuedev/continue","slug":"failed-to-install-docker-model-targetmodel-e","errorCode":null,"errorMessage":"Failed to install Docker model ${targetModel}: ${errorMessage}","messagePattern":"Failed to install Docker model (.+?): (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/llm/llms/Docker.ts","lineNumber":204,"sourceCode":"      const { stdout, stderr } = await this.executeDockerCommand(\n        [\"model\", \"pull\", targetModel],\n        signal,\n      );\n\n      // Report completion\n      progressReporter?.(\n        `Docker model ${targetModel} installed successfully`,\n        100,\n        100,\n      );\n\n      return { success: true, stdout, stderr };\n    } catch (error) {\n      console.error(`Failed to install Docker model ${targetModel}:`, error);\n      // Fix: Type check the error before accessing message property\n      const errorMessage =\n        error instanceof Error ? error.message : String(error);\n      throw new Error(\n        `Failed to install Docker model ${targetModel}: ${errorMessage}`,\n      );\n    } finally {\n      const release = await Docker.modelsBeingInstalledMutex.acquire();\n      try {\n        Docker.modelsBeingInstalled.delete(modelName);\n      } finally {\n        release();\n      }\n    }\n  }\n\n  public async isInstallingModel(modelName: string): Promise<boolean> {\n    const release = await Docker.modelsBeingInstalledMutex.acquire();\n    try {\n      return Docker.modelsBeingInstalled.has(modelName);\n    } finally {\n      release();","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/continuedev/continue/blob/5522c6f44ca0ac3528b37244818fbfa39b5af470/core/llm/llms/Docker.ts#L186-L222","documentation":"Thrown by Docker.installModel when the underlying `docker model install/pull` CLI command fails; the command's stderr is embedded via errorMessage. The static modelsBeingInstalled entry is cleaned up in finally, so the same install can be retried afterwards.","triggerScenarios":"Docker daemon not running or unreachable, docker CLI missing from PATH, insufficient disk space, image/model not found in the registry, auth required to pull, or Docker Desktop version lacking the `docker model` subcommand.","commonSituations":"CI containers without a mounted Docker socket, old Docker Desktop without model support, corporate proxies blocking registry pulls, or out-of-disk build agents.","solutions":["Run the failing command manually (e.g. docker model install <name>) and read the stderr in the message","Ensure the Docker daemon is running and the user has socket permissions (docker ps works)","Upgrade to a Docker Desktop/engine version that supports the model CLI command","Free disk space / fix registry auth / proxy config as indicated by the embedded stderr"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const { stdout } = await exec('docker model ls').catch(() => ({ stdout: '' }));\nconst installed = stdout.split('\\n').some(l => l.includes(modelName));\nif (!installed) await docker.installModel(modelName);","typeGuard":"function isDockerInstallError(e: unknown): boolean {\n  return e instanceof Error && e.message.startsWith('Failed to install Docker model');\n}","tryCatchPattern":"try { await docker.installModel(model); }\ncatch (e) {\n  if (isDockerInstallError(e)) {\n    logger.error(e.message); // includes docker stderr\n    return fallbackEmbedder.embed(text); // offline fallback\n  }\n  throw e;\n}","preventionTips":["Run `docker ps` and `docker model ls` health checks before installing","Keep Docker Desktop/engine updated","Maintain a fallback local embedding provider"],"tags":["docker","model-install","cli","docker-daemon"],"backgroundTag":"docker-command-failed","analyzedSha":"5522c6f44ca0ac3528b37244818fbfa39b5af470","analyzedAt":"2026-08-27T11:28:54.683Z","schemaVersion":2},"datasetVersion":"2026-08-27T13:17:12.746Z"}