mirror of https://github.com/docker/docker-py.git
add support of DOCKER_API_VERSION
Signed-off-by: Mateusz Zakarczemny <m.zakarczemny+githyb@gmail.com>
This commit is contained in:
parent
416ea74e3f
commit
e78605e23c
|
@ -60,6 +60,11 @@ class DockerClient(object):
|
|||
A path to a directory containing TLS certificates to use when
|
||||
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:
|
||||
version (str): The version of the API to use. Set to ``auto`` to
|
||||
automatically detect the server's version. Default: ``1.30``
|
||||
|
|
|
@ -329,6 +329,8 @@ def kwargs_from_env(ssl_version=None, assert_hostname=None, environment=None):
|
|||
tls_verify = tls_verify is not None
|
||||
enable_tls = cert_path or tls_verify
|
||||
|
||||
docker_api_version = environment.get('DOCKER_API_VERSION')
|
||||
|
||||
params = {}
|
||||
|
||||
if host:
|
||||
|
@ -356,6 +358,8 @@ def kwargs_from_env(ssl_version=None, assert_hostname=None, environment=None):
|
|||
assert_hostname=assert_hostname,
|
||||
)
|
||||
|
||||
params['version'] = docker_api_version
|
||||
|
||||
return params
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue