summaryrefslogtreecommitdiff
path: root/docker/api/build.py
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2018-01-30 18:22:41 -0800
committerJoffrey F <joffrey@docker.com>2018-01-30 18:42:38 -0800
commitccbde11c8dbb8773aed84abac92c6361b8e11229 (patch)
tree8bf4e02458dded8990a80a8e6bdcb3a1cdea3532 /docker/api/build.py
parent75e2e8ad816ac35e1c4928f6b3f9e40841ca493c (diff)
downloaddocker-py-improve_authconfig_genconfig_separation.tar.gz
Improve separation between auth_configs and general_configsimprove_authconfig_genconfig_separation
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'docker/api/build.py')
-rw-r--r--docker/api/build.py6
1 files changed, 2 insertions, 4 deletions
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]