mirror of
https://github.com/fosrl/newt.git
synced 2026-02-28 07:46:37 +00:00
fix: remove hardcoded protocol from socket path
This commit is contained in:
@@ -165,7 +165,7 @@ func ListContainers(socketPath string, enforceNetworkValidation bool) ([]Contain
|
|||||||
|
|
||||||
// Create client with custom socket path
|
// Create client with custom socket path
|
||||||
cli, err := client.NewClientWithOpts(
|
cli, err := client.NewClientWithOpts(
|
||||||
client.WithHost("unix://"+socketPath),
|
client.WithHost(socketPath),
|
||||||
client.WithAPIVersionNegotiation(),
|
client.WithAPIVersionNegotiation(),
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -215,7 +215,6 @@ func ListContainers(socketPath string, enforceNetworkValidation bool) ([]Contain
|
|||||||
hostname = containerInfo.Config.Hostname
|
hostname = containerInfo.Config.Hostname
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Skip host container if set
|
// Skip host container if set
|
||||||
if hostContainerId != "" && c.ID == hostContainerId {
|
if hostContainerId != "" && c.ID == hostContainerId {
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user