Git Product home page Git Product logo

docker_mirror's Issues

Docker 官方**源貌似挂了

一个月前我访问 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 不打算提供**服务了。

Failed to execute docker_mirror.py in centOS7.6

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'

If it is possible to boost the speed of running?

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下默认无配置文件

默认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'))

No such file or directory: u'/etc/sysconfig/docker' . centos 7

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)

client is newer than server

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)

  • docker.errors.APIError: 400 Client Error: Bad Request ("client is newer than server (client API version: 1.35, server API version: 1.21)")

部分 docker 版本的 ce 识别 不准确

比如:

image

>>> import docker
>>> client = docker.from_env()
>>> version = client.version()[u'Version']
>>> version
'19.03.7'
>>>

version中没有ce子串,没有应用修改 /etc/docker/daemon.json 的换镜像方式

image

    if "ce" in version:
        set_docker_config_ce(best_mirror_url)
    else:
        set_docker_config(best_mirror_url)

此处的识别有点毛病

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.