feat: support adding labels on dynamic container creation (#620)

Co-authored-by: Benjamin Sanders <ben@benjaminsanders.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jake Turner 2026-04-01 11:12:28 -07:00 committed by GitHub
parent a3f164d695
commit cd9a78b473
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -513,6 +513,11 @@ export class DockerService {
const container = await this.docker.createContainer({
Image: finalImage,
name: service.service_name,
Labels: {
...(containerConfig?.Labels ?? {}),
'com.docker.compose.project': 'project-nomad-managed',
'io.project-nomad.managed': 'true',
},
...(containerConfig?.User && { User: containerConfig.User }),
HostConfig: gpuHostConfig,
...(containerConfig?.WorkingDir && { WorkingDir: containerConfig.WorkingDir }),