Fix canonical container name

Signed-off-by: jhrotko <joana.hrotko@docker.com>
This commit is contained in:
jhrotko 2024-01-30 13:27:27 +00:00 committed by Nicolas De loof
parent ac8ea082a1
commit 0582001810
1 changed files with 2 additions and 1 deletions

View File

@ -132,7 +132,8 @@ func getCanonicalContainerName(c moby.Container) string {
return name[1:]
}
}
return c.Names[0][1:]
return strings.TrimPrefix(c.Names[0], "/")
}
func getContainerNameWithoutProject(c moby.Container) string {