mirror of https://github.com/docker/docker-py.git
Merge e78605e23c
into db7f8b8bb6
This commit is contained in:
commit
ccbee9489f
|
@ -65,6 +65,11 @@ class DockerClient:
|
||||||
A path to a directory containing TLS certificates to use when
|
A path to a directory containing TLS certificates to use when
|
||||||
connecting to the Docker host.
|
connecting to the Docker host.
|
||||||
|
|
||||||
|
.. envvar:: DOCKER_API_VERSION
|
||||||
|
|
||||||
|
A path to a directory containing TLS certificates to use when
|
||||||
|
connecting to the Docker host.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
version (str): The version of the API to use. Set to ``auto`` to
|
version (str): The version of the API to use. Set to ``auto`` to
|
||||||
automatically detect the server's version. Default: ``auto``
|
automatically detect the server's version. Default: ``auto``
|
||||||
|
|
|
@ -367,6 +367,8 @@ def kwargs_from_env(environment=None):
|
||||||
tls_verify = tls_verify is not None
|
tls_verify = tls_verify is not None
|
||||||
enable_tls = cert_path or tls_verify
|
enable_tls = cert_path or tls_verify
|
||||||
|
|
||||||
|
docker_api_version = environment.get('DOCKER_API_VERSION')
|
||||||
|
|
||||||
params = {}
|
params = {}
|
||||||
|
|
||||||
if host:
|
if host:
|
||||||
|
@ -385,6 +387,8 @@ def kwargs_from_env(environment=None):
|
||||||
verify=tls_verify,
|
verify=tls_verify,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
params['version'] = docker_api_version
|
||||||
|
|
||||||
return params
|
return params
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue