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 <[email protected]>
This commit is contained in:
2026-02-09 21:22:52 -06:00
co-authored by Claude Opus 4.6
parent d273220838
commit 281c7ab39b
@@ -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<string>(
"orchestrator.docker.socketPath",