fix(orchestrator): resolve DockerSandboxService DI failure on startup
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

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 <noreply@anthropic.com>
This commit is contained in:
2026-02-09 21:22:31 -06:00
parent d273220838
commit 281c7ab39b

View File

@@ -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",