fix(orchestrator): resolve DockerSandboxService DI failure on startup
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user