mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-11 21:05:23 +01:00
fix(docker): correct 89cbcfee8c
This commit is contained in:
@@ -149,8 +149,6 @@ func NewClient(cfg types.DockerProviderConfig, unique ...bool) (*SharedClient, e
|
||||
var addr string
|
||||
var dial func(ctx context.Context) (net.Conn, error)
|
||||
|
||||
opt = append(opt, client.WithAPIVersionNegotiation())
|
||||
|
||||
if agent.IsDockerHostAgent(host) {
|
||||
a, ok := agentpool.Get(host)
|
||||
if !ok {
|
||||
@@ -200,6 +198,8 @@ func NewClient(cfg types.DockerProviderConfig, unique ...bool) (*SharedClient, e
|
||||
opt = append(opt, client.WithTLSClientConfig(cfg.TLS.CAFile, cfg.TLS.CertFile, cfg.TLS.KeyFile))
|
||||
}
|
||||
|
||||
opt = append(opt, client.WithAPIVersionNegotiation())
|
||||
|
||||
client, err := client.NewClientWithOpts(opt...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user