File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ import (
23
23
"bytes"
24
24
"context"
25
25
"fmt"
26
- "net"
27
26
"net/url"
28
27
"os"
29
28
"path/filepath"
@@ -69,17 +68,7 @@ func (l *Local) RelationshipsFromDocker() Relationships {
69
68
return nil
70
69
}
71
70
72
- opts := [](docker.Opt ){docker .FromEnv }
73
- if host := os .Getenv (docker .EnvOverrideHost ); host != "" && ! strings .HasPrefix (host , "unix://" ) {
74
- // Setting a dialer on top of a unix socket breaks the connection
75
- // as the client then tries to connect to http:///path/to/socket and
76
- // thus tries to resolve the /path/to/socket host
77
- dialer := & net.Dialer {
78
- Timeout : 2 * time .Second ,
79
- }
80
- opts = append (opts , docker .WithDialContext (dialer .DialContext ))
81
- }
82
- client , err := docker .NewClientWithOpts (opts ... )
71
+ client , err := docker .NewClientWithOpts (docker .WithTimeout (2 * time .Second ), docker .FromEnv )
83
72
if err != nil {
84
73
if l .Debug {
85
74
fmt .Fprintf (os .Stderr , "ERROR: %s\n " , err )
You can’t perform that action at this time.
0 commit comments