Skip to content

Commit 0582001

Browse files
jhrotkondeloof
authored andcommitted
Fix canonical container name
Signed-off-by: jhrotko <[email protected]>
1 parent ac8ea08 commit 0582001

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/compose/compose.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ func getCanonicalContainerName(c moby.Container) string {
132132
return name[1:]
133133
}
134134
}
135-
return c.Names[0][1:]
135+
136+
return strings.TrimPrefix(c.Names[0], "/")
136137
}
137138

138139
func getContainerNameWithoutProject(c moby.Container) string {

0 commit comments

Comments
 (0)