mirror of https://github.com/docker/cli.git
context: ClientOpts() now includes WithAPIVersionNegotiation if version is missing
Signed-off-by: Tibor Vass <tibor@docker.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
a77e3af471
commit
c52e1f2487
|
@ -128,6 +128,8 @@ func (c *Endpoint) ClientOpts() ([]client.Opt, error) {
|
||||||
version := os.Getenv("DOCKER_API_VERSION")
|
version := os.Getenv("DOCKER_API_VERSION")
|
||||||
if version != "" {
|
if version != "" {
|
||||||
result = append(result, client.WithVersion(version))
|
result = append(result, client.WithVersion(version))
|
||||||
|
} else {
|
||||||
|
result = append(result, client.WithAPIVersionNegotiation())
|
||||||
}
|
}
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue