Skip to content

Commit e9dbfb2

Browse files
committed
fix: remove hardcoded protocol from socket path
1 parent a79dccc commit e9dbfb2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docker/client.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func ListContainers(socketPath string, enforceNetworkValidation bool) ([]Contain
165165

166166
// Create client with custom socket path
167167
cli, err := client.NewClientWithOpts(
168-
client.WithHost("unix://"+socketPath),
168+
client.WithHost(socketPath),
169169
client.WithAPIVersionNegotiation(),
170170
)
171171
if err != nil {
@@ -215,7 +215,6 @@ func ListContainers(socketPath string, enforceNetworkValidation bool) ([]Contain
215215
hostname = containerInfo.Config.Hostname
216216
}
217217

218-
219218
// Skip host container if set
220219
if hostContainerId != "" && c.ID == hostContainerId {
221220
continue

0 commit comments

Comments
 (0)