silenceshell / docker_mirror Goto Github PK
View Code? Open in Web Editor NEW查找最快的docker镜像
Home Page: https://silenceshell.github.io/docker_mirror/
License: MIT License
查找最快的docker镜像
Home Page: https://silenceshell.github.io/docker_mirror/
License: MIT License
一个月前我访问 https://registry.docker-cn.com
,就是下面的情况连接超时:
C:\Users\XhstormR>curl -ik https://registry.docker-cn.com
curl: (7) Failed to connect to registry.docker-cn.com port 443: Timed out
今天我访问 https://www.docker-cn.com/get-docker
,发现跳到 www.docker.com 了,貌似 Docker 不打算提供**服务了。
Traceback (most recent call last):
File "./docker_mirror.py", line 166, in
cost_time = get_speed(k, v)
File "./docker_mirror.py", line 133, in get_speed
set_docker_config_ce(mirror_url)
File "./docker_mirror.py", line 111, in set_docker_config_ce
docker_config = get_config_ce(dist)
File "./docker_mirror.py", line 59, in get_config_ce
return docker_ce_config_map[dist]["config"]
KeyError: 'CentOS Linux'
This tool is very exciting, and I love it very much. But the speed of pulling the Cent OS image is too slow, I think if we could use other faster methods to test the mirror servers's speed, we can make this fancy tool easier to use.
默认ubuntu20.04下apt安装docker,并无配置文件,相关的配置的是在/lib/systemd/system/docker.service中直接配的,它默认并不引用配置文件。
[root@localhost docker]# python docker_mirror.py
Traceback (most recent call last):
File "docker_mirror.py", line 153, in
speed = get_speed(k, v)
File "docker_mirror.py", line 123, in get_speed
version = client.version()[u'Version']
File "/usr/lib/python2.7/site-packages/docker/client.py", line 186, in version
return self.api.version(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/docker/api/daemon.py", line 179, in version
return self._result(self._get(url), json=True)
File "/usr/lib/python2.7/site-packages/docker/utils/decorators.py", line 46, in inner
return f(self, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/docker/api/client.py", line 194, in _get
return self.get(url, **self._set_request_timeout(kwargs))
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 521, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error(2, 'No such file or directory'))
should i create this file mannually ?
`
[root@localhost yiqing]# python docker_mirror.py
restart docker daemon
Traceback (most recent call last):
File "docker_mirror.py", line 172, in
cost_time = get_speed(k, v)
File "docker_mirror.py", line 137, in get_speed
set_docker_config(mirror_url)
File "docker_mirror.py", line 100, in set_docker_config
with open(docker_config, "r") as f:
IOError: [Errno 2] No such file or directory: u'/etc/sysconfig/docker'
`
[root@localhost yiqing]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
Traceback (most recent call last):
File "./docker_mirror.py", line 153, in
speed = get_speed(k, v)
File "./docker_mirror.py", line 123, in get_speed
version = client.version()[u'Version']
File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 186, in version
return self.api.version(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/docker/api/daemon.py", line 179, in version
return self._result(self._get(url), json=True)
File "/usr/local/lib/python2.7/dist-packages/docker/api/client.py", line 231, in _result
self._raise_for_status(response)
File "/usr/local/lib/python2.7/dist-packages/docker/api/client.py", line 227, in _raise_for_status
raise create_api_error_from_http_exception(e)
File "/usr/local/lib/python2.7/dist-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation)
希望大佬可以加上daocloud的加速站,这个是我测试的最快的一个
http://f1361db2.m.daocloud.io
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.