Browse Source

Fix canonical container name

Signed-off-by: jhrotko <[email protected]>
jhrotko 1 year ago
parent
commit
0582001810
1 changed files with 2 additions and 1 deletions
  1. 2 1
      pkg/compose/compose.go

+ 2 - 1
pkg/compose/compose.go

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