Merge pull request #1845 from tiborvass/apiversion-negotiation

Apiversion negotiation
This commit is contained in:
Silvin Lubecki 2019-05-14 10:27:05 +02:00 committed by GitHub
commit 873afb9c94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -128,6 +128,8 @@ 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())
}
return result, nil
}