mirror of
https://github.com/cuigh/swirl
synced 2024-12-28 14:51:57 +00:00
Use locked API version to ensure compatibility
This commit is contained in:
parent
62ede94143
commit
317446e5cd
@ -2,6 +2,7 @@ package docker
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"github.com/cuigh/auxo/log"
|
||||
@ -36,6 +37,7 @@ func (m *manager) Client() (ctx context.Context, cli *client.Client, err error)
|
||||
|
||||
if m.client == nil {
|
||||
if misc.Options.DockerEndpoint == "" {
|
||||
os.Setenv("DOCKER_API_VERSION", apiVersion)
|
||||
m.client, err = client.NewEnvClient()
|
||||
} else {
|
||||
m.client, err = client.NewClient(misc.Options.DockerEndpoint, apiVersion, nil, nil)
|
||||
|
Loading…
Reference in New Issue
Block a user