Explorar el Código

Fix canonical container name

Signed-off-by: jhrotko <[email protected]>
jhrotko hace 1 año
padre
commit
0582001810
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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 {