diff --git a/pkg/commands/docker.go b/pkg/commands/docker.go index 0c11b571..3285fdbb 100644 --- a/pkg/commands/docker.go +++ b/pkg/commands/docker.go @@ -253,7 +253,7 @@ func (c *DockerCommand) GetContainers(existingContainers []*Container) ([]*Conta } newContainer.Container = ctr - // if the container is made with a name label we will use that + // if the container is made with a name then use that directly if len(ctr.Names) > 0 && ctr.Names[0] != "" { newContainer.Name = strings.TrimLeft(ctr.Names[0], "/") } else if name, ok := ctr.Labels["name"]; ok {