summaryrefslogtreecommitdiff
path: root/docker/client.py
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2018-06-08 15:14:06 -0700
committerJoffrey F <joffrey@docker.com>2018-06-08 15:24:56 -0700
commit9d8ea53149b21ff64d1fa5911eecb54ff3dc2244 (patch)
treea25cc3cbe4dd35da5131b522846c0d8cbfe25246 /docker/client.py
parent2d0c5dd484e7621a9859ab40ac43d25a1f5f5078 (diff)
downloaddocker-py-c5930-credstore-env.tar.gz
Allow passing of env overrides to credstore through APIClient ctorc5930-credstore-env
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'docker/client.py')
-rw-r--r--docker/client.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/docker/client.py b/docker/client.py
index b4364c3..8d4a52b 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -33,6 +33,8 @@ class DockerClient(object):
:py:class:`~docker.tls.TLSConfig` object to use custom
configuration.
user_agent (str): Set a custom user agent for requests to the server.
+ credstore_env (dict): Override environment variables when calling the
+ credential store process.
"""
def __init__(self, *args, **kwargs):
self.api = APIClient(*args, **kwargs)
@@ -66,6 +68,8 @@ class DockerClient(object):
assert_hostname (bool): Verify the hostname of the server.
environment (dict): The environment to read environment variables
from. Default: the value of ``os.environ``
+ credstore_env (dict): Override environment variables when calling
+ the credential store process.
Example:
@@ -77,8 +81,9 @@ class DockerClient(object):
"""
timeout = kwargs.pop('timeout', DEFAULT_TIMEOUT_SECONDS)
version = kwargs.pop('version', None)
- return cls(timeout=timeout, version=version,
- **kwargs_from_env(**kwargs))
+ return cls(
+ timeout=timeout, version=version, **kwargs_from_env(**kwargs)
+ )
# Resources
@property