mirror of https://github.com/docker/cli.git
context: Endpoint.ClientOpts(): use client.WithVersionFromEnv()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
1db2da57c8
commit
04347f793d
|
@ -6,7 +6,6 @@ import (
|
|||
"encoding/pem"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/docker/cli/cli/connhelper"
|
||||
|
@ -122,12 +121,7 @@ func (c *Endpoint) ClientOpts() ([]client.Opt, error) {
|
|||
}
|
||||
}
|
||||
|
||||
version := os.Getenv("DOCKER_API_VERSION")
|
||||
if version != "" {
|
||||
result = append(result, client.WithVersion(version))
|
||||
} else {
|
||||
result = append(result, client.WithAPIVersionNegotiation())
|
||||
}
|
||||
result = append(result, client.WithVersionFromEnv(), client.WithAPIVersionNegotiation())
|
||||
return result, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue