From ccbde11c8dbb8773aed84abac92c6361b8e11229 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Tue, 30 Jan 2018 18:22:41 -0800 Subject: Improve separation between auth_configs and general_configs Signed-off-by: Joffrey F --- docker/api/build.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'docker/api/build.py') diff --git a/docker/api/build.py b/docker/api/build.py index 32238ef..220c93f 100644 --- a/docker/api/build.py +++ b/docker/api/build.py @@ -300,14 +300,12 @@ class BuildApiMixin(object): # Matches CLI behavior: https://github.com/docker/docker/blob/ # 67b85f9d26f1b0b2b240f2d794748fac0f45243c/cliconfig/ # credentials/native_store.go#L68-L83 - for registry in self._auth_configs.keys(): - if registry == 'credsStore' or registry == 'HttpHeaders': - continue + for registry in self._auth_configs.get('auths', {}).keys(): auth_data[registry] = auth.resolve_authconfig( self._auth_configs, registry ) else: - auth_data = self._auth_configs.copy() + auth_data = self._auth_configs.get('auths', {}).copy() # See https://github.com/docker/docker-py/issues/1683 if auth.INDEX_NAME in auth_data: auth_data[auth.INDEX_URL] = auth_data[auth.INDEX_NAME] -- cgit v1.2.1