From 281c7ab39b8fbe5da36aa5fa5945b19ed1413040 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Mon, 9 Feb 2026 21:22:31 -0600 Subject: [PATCH] fix(orchestrator): resolve DockerSandboxService DI failure on startup Add explicit @Inject("DOCKER_CLIENT") token to the Docker constructor parameter in DockerSandboxService. The @Optional() decorator alone was not suppressing the NestJS resolution error for the external dockerode class, causing the orchestrator container to crash on startup. Co-Authored-By: Claude Opus 4.6 --- apps/orchestrator/src/spawner/docker-sandbox.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/orchestrator/src/spawner/docker-sandbox.service.ts b/apps/orchestrator/src/spawner/docker-sandbox.service.ts index 643377f..21f7ae3 100644 --- a/apps/orchestrator/src/spawner/docker-sandbox.service.ts +++ b/apps/orchestrator/src/spawner/docker-sandbox.service.ts @@ -1,4 +1,4 @@ -import { Injectable, Logger, Optional } from "@nestjs/common"; +import { Inject, Injectable, Logger, Optional } from "@nestjs/common"; import { ConfigService } from "@nestjs/config"; import { randomBytes } from "crypto"; import Docker from "dockerode"; @@ -86,7 +86,7 @@ export class DockerSandboxService { constructor( private readonly configService: ConfigService, - @Optional() docker?: Docker + @Optional() @Inject("DOCKER_CLIENT") docker?: Docker ) { const socketPath = this.configService.get( "orchestrator.docker.socketPath",