File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 1111from traitlets .config import LoggingConfigurable
1212from traitlets import Dict , Unicode , default
1313
14- DEFAULT_DOCKER_REGISTRY_URL = "https://registry.hub. docker.com "
14+ DEFAULT_DOCKER_REGISTRY_URL = "https://registry-1. docker.io "
1515DEFAULT_DOCKER_AUTH_URL = "https://index.docker.io/v1"
1616
1717
@@ -128,7 +128,7 @@ def _default_token_url(self):
128128 url = urlparse (self .url )
129129 if ("." + url .hostname ).endswith (".gcr.io" ):
130130 return "https://{0}/v2/token?service={0}" .format (url .hostname )
131- elif self .url .endswith (".docker.com " ):
131+ elif self .url .endswith (".docker.io " ):
132132 return "https://auth.docker.io/token?service=registry.docker.io"
133133 else :
134134 # is gcr.io's token url common? If so, it might be worth defaulting
Original file line number Diff line number Diff line change 1212
1313def test_registry_defaults (tmpdir ):
1414 registry = DockerRegistry (docker_config_path = str (tmpdir .join ("doesntexist.json" )))
15- assert registry .url == "https://registry.hub. docker.com "
15+ assert registry .url == "https://registry-1. docker.io "
1616 assert registry .auth_config_url == "https://index.docker.io/v1"
1717 assert (
1818 registry .token_url == "https://auth.docker.io/token?service=registry.docker.io"
@@ -37,7 +37,7 @@ def test_registry_username_password(tmpdir):
3737 registry = DockerRegistry (docker_config_path = str (config_json ))
3838 assert registry .username == "user"
3939 assert registry .password == "pass"
40- assert registry .url == "https://registry.hub. docker.com "
40+ assert registry .url == "https://registry-1. docker.io "
4141
4242
4343def test_registry_gcr_defaults (tmpdir ):
Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ If you setup your own local registry using
281281 url: "https://index.docker.io/v1"
282282 config:
283283 DockerRegistry:
284- url: "https://registry.hub. docker.com " # the actual v2 registry url
284+ url: "https://registry-1. docker.io " # the recommended registry URL
285285 auth_config_url: "https://index.docker.io/v1" # must match above!
286286 token_url: "https://auth.docker.io/token?service=registry.docker.io"
287287
You can’t perform that action at this time.
0 commit comments