summaryrefslogtreecommitdiff
path: root/docker/auth.py
diff options
context:
space:
mode:
authorJoffrey F <joffrey@docker.com>2017-08-15 15:38:09 -0700
committerJoffrey F <joffrey@docker.com>2017-08-15 15:38:09 -0700
commit9d78fab2e1e3bc8a5a3cef5e2425b45ab42f996d (patch)
treef1010948f84344599bab6264e2a9f4d0e777636c /docker/auth.py
parent5e4a69bbdafef6f1036b733ce356c6692c65e775 (diff)
downloaddocker-py-1683-build-private-source-hub.tar.gz
Daemon expects full URL of hub in auth config dict in build payload1683-build-private-source-hub
Signed-off-by: Joffrey F <joffrey@docker.com>
Diffstat (limited to 'docker/auth.py')
-rw-r--r--docker/auth.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/docker/auth.py b/docker/auth.py
index ec9c45b..c3fb062 100644
--- a/docker/auth.py
+++ b/docker/auth.py
@@ -10,7 +10,7 @@ from . import errors
from .constants import IS_WINDOWS_PLATFORM
INDEX_NAME = 'docker.io'
-INDEX_URL = 'https://{0}/v1/'.format(INDEX_NAME)
+INDEX_URL = 'https://index.{0}/v1/'.format(INDEX_NAME)
DOCKER_CONFIG_FILENAME = os.path.join('.docker', 'config.json')
LEGACY_DOCKER_CONFIG_FILENAME = '.dockercfg'
TOKEN_USERNAME = '<token>'
@@ -118,7 +118,7 @@ def _resolve_authconfig_credstore(authconfig, registry, credstore_name):
if not registry or registry == INDEX_NAME:
# The ecosystem is a little schizophrenic with index.docker.io VS
# docker.io - in that case, it seems the full URL is necessary.
- registry = 'https://index.docker.io/v1/'
+ registry = INDEX_URL
log.debug("Looking for auth entry for {0}".format(repr(registry)))
store = dockerpycreds.Store(credstore_name)
try: