Skip to content

Commit

Permalink
Fix canonical container name
Browse files Browse the repository at this point in the history
Signed-off-by: jhrotko <joana.hrotko@docker.com>
  • Loading branch information
jhrotko authored and ndeloof committed Jan 30, 2024
1 parent ac8ea08 commit 0582001
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/compose/compose.go
Expand Up @@ -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 {
Expand Down

0 comments on commit 0582001

Please sign in to comment.