Merge pull request #2399 from fluetm/build-index-url-fix

Correct INDEX_URL logic in build.py _set_auth_headers
This commit is contained in:
Joffrey F 2019-08-27 00:14:40 -07:00 committed by GitHub
commit 33b430ab7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -308,7 +308,8 @@ class BuildApiMixin(object):
auth_data = self._auth_configs.get_all_credentials()
# See https://github.com/docker/docker-py/issues/1683
if auth.INDEX_URL not in auth_data and auth.INDEX_URL in auth_data:
if (auth.INDEX_URL not in auth_data and
auth.INDEX_NAME in auth_data):
auth_data[auth.INDEX_URL] = auth_data.get(auth.INDEX_NAME, {})
log.debug(