From a8b3b8a756b4955d0659788c00291a32d1565ad2 Mon Sep 17 00:00:00 2001 From: Umer Farooq Mala <57412578+umermala@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:07:17 +0500 Subject: [PATCH] Update docker.go --- pkg/commands/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {