mirror of
https://github.com/cuigh/swirl
synced 2024-12-30 15:53:24 +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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/cuigh/auxo/log"
|
"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 m.client == nil {
|
||||||
if misc.Options.DockerEndpoint == "" {
|
if misc.Options.DockerEndpoint == "" {
|
||||||
|
os.Setenv("DOCKER_API_VERSION", apiVersion)
|
||||||
m.client, err = client.NewEnvClient()
|
m.client, err = client.NewEnvClient()
|
||||||
} else {
|
} else {
|
||||||
m.client, err = client.NewClient(misc.Options.DockerEndpoint, apiVersion, nil, nil)
|
m.client, err = client.NewClient(misc.Options.DockerEndpoint, apiVersion, nil, nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user