continuedev/continue · error · Error
Failed to install Docker model ${targetModel}: ${errorMessag
Error message
Failed to install Docker model ${targetModel}: ${errorMessage} What it means
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.
Source
Thrown at core/llm/llms/Docker.ts:204
const { stdout, stderr } = await this.executeDockerCommand(
["model", "pull", targetModel],
signal,
);
// Report completion
progressReporter?.(
`Docker model ${targetModel} installed successfully`,
100,
100,
);
return { success: true, stdout, stderr };
} catch (error) {
console.error(`Failed to install Docker model ${targetModel}:`, error);
// Fix: Type check the error before accessing message property
const errorMessage =
error instanceof Error ? error.message : String(error);
throw new Error(
`Failed to install Docker model ${targetModel}: ${errorMessage}`,
);
} finally {
const release = await Docker.modelsBeingInstalledMutex.acquire();
try {
Docker.modelsBeingInstalled.delete(modelName);
} finally {
release();
}
}
}
public async isInstallingModel(modelName: string): Promise<boolean> {
const release = await Docker.modelsBeingInstalledMutex.acquire();
try {
return Docker.modelsBeingInstalled.has(modelName);
} finally {
release();View on GitHub (pinned to 5522c6f44c)
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
Defensive patterns
Strategy: fallback
Validate before calling
const { stdout } = await exec('docker model ls').catch(() => ({ stdout: '' }));
const installed = stdout.split('\n').some(l => l.includes(modelName));
if (!installed) await docker.installModel(modelName); Type guard
function isDockerInstallError(e: unknown): boolean {
return e instanceof Error && e.message.startsWith('Failed to install Docker model');
} Try / catch
try { await docker.installModel(model); }
catch (e) {
if (isDockerInstallError(e)) {
logger.error(e.message); // includes docker stderr
return fallbackEmbedder.embed(text); // offline fallback
}
throw e;
} Prevention
- Run `docker ps` and `docker model ls` health checks before installing
- Keep Docker Desktop/engine updated
- Maintain a fallback local embedding provider
When it happens
Trigger: 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.
Common situations: CI containers without a mounted Docker socket, old Docker Desktop without model support, corporate proxies blocking registry pulls, or out-of-disk build agents.
Related errors
- Model '${modelName}' is already being installed.
- '${modelName}' not found in the Ollama registry!
- Model '${modelName}' is already being installed.
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/39121c1d90a78129.
Report an issue: GitHub.