diff --git a/src/docker.ts b/src/docker.ts index 5fd3aed..b5b1468 100644 --- a/src/docker.ts +++ b/src/docker.ts @@ -50,7 +50,7 @@ export class DockerManager { for (const container of containers) { const labels: DockerCiLabels = container.Labels; if (labels["docker-ci.enable"] === "true") - response[container.Id] = labels["docker-ci.name"] || (await this.getContainer(container.Id).inspect()).Name; + response[container.Id] = labels["docker-ci.name"] || (await this.getContainer(container.Id).inspect()).Name.replace("/", "") } return response; } diff --git a/src/index.ts b/src/index.ts index c3f7ee8..9990955 100644 --- a/src/index.ts +++ b/src/index.ts @@ -49,7 +49,7 @@ class App { try { const containerInfos = await this._dockerManager.getContainer(res.Actor.ID).inspect(); const labels: DockerCiLabels = containerInfos.Config.Labels; - const routeId = labels["docker-ci.name"] || containerName; + const routeId = labels["docker-ci.name"] || containerName.replace("/", ""); if (labels["docker-ci.enable"] === "true") { this._logger.log("Docker-ci enabled, adding container to webhook conf"); this._addContainerConf(routeId, containerInfos.Id);