fix: remove hardcoded protocol from socket path

Former-commit-id: e9dbfb239b
This commit is contained in:
Nemental
2025-07-30 09:36:53 +02:00
parent 1ffe6b6b67
commit e86543c8a2

View File

@@ -165,7 +165,7 @@ func ListContainers(socketPath string, enforceNetworkValidation bool) ([]Contain
// Create client with custom socket path
cli, err := client.NewClientWithOpts(
client.WithHost("unix://"+socketPath),
client.WithHost(socketPath),
client.WithAPIVersionNegotiation(),
)
if err != nil {
@@ -215,7 +215,6 @@ func ListContainers(socketPath string, enforceNetworkValidation bool) ([]Contain
hostname = containerInfo.Config.Hostname
}
// Skip host container if set
if hostContainerId != "" && c.ID == hostContainerId {
continue