diff --git a/pkg/compose/compose.go b/pkg/compose/compose.go index 9230e8091..102dd86ef 100644 --- a/pkg/compose/compose.go +++ b/pkg/compose/compose.go @@ -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 {