mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-20 07:21:26 +02: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 addr string
|
||||||
var dial func(ctx context.Context) (net.Conn, error)
|
var dial func(ctx context.Context) (net.Conn, error)
|
||||||
|
|
||||||
opt = append(opt, client.WithAPIVersionNegotiation())
|
|
||||||
|
|
||||||
if agent.IsDockerHostAgent(host) {
|
if agent.IsDockerHostAgent(host) {
|
||||||
a, ok := agentpool.Get(host)
|
a, ok := agentpool.Get(host)
|
||||||
if !ok {
|
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.WithTLSClientConfig(cfg.TLS.CAFile, cfg.TLS.CertFile, cfg.TLS.KeyFile))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opt = append(opt, client.WithAPIVersionNegotiation())
|
||||||
|
|
||||||
client, err := client.NewClientWithOpts(opt...)
|
client, err := client.NewClientWithOpts(opt...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Reference in New Issue
Block a user