瀏覽代碼

Fix canonical container name

Signed-off-by: jhrotko <[email protected]>
jhrotko 1 年之前
父節點
當前提交
0582001810
共有 1 個文件被更改,包括 2 次插入1 次删除
  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 c.Names[0][1:]
+
+	return strings.TrimPrefix(c.Names[0], "/")
 }
 
 func getContainerNameWithoutProject(c moby.Container) string {