我尝试并尝试在docker-registry中创建镜像。我已阅读this中的教程。并使用this中的方式。我确定我已经为docker守护进程添加了变量。我在mac OS X上成功了,但是在我的centOS上它根本不起作用。如何在CentOS上创建docker注册表镜像
我使用这个命令来运行我的码头工人守护进程:
docker -g /opt/apps/docker/lib --insecure-registry http://10.11.150.76:5555 --registry-mirror=http://10.11.150.76:5555 -d
,我用这个命令检查码头工人守护进程:
ps -ef | grep "docker"
它真的已经加入到泊坞窗:
root 1232 30203 0 20:47 ? 00:00:00 docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 10022 -container-ip 172.17.0.22 -container-port 22
root 1322 735 0 20:57 pts/7 00:00:00 grep --color=auto docker
root 30202 1 0 20:15 ? 00:00:00 sudo http_proxy=http://10.16.10.129:9526/ docker -g /opt/apps/docker/lib --insecure-registry http://10.11.150.76:5555 --registry-mirror=http://10.11.150.76:5555 -d
然后,我用这个命令创建镜像:
docker run -d -p 5555:5000 -e STORAGE_PATH=/mirror -e STANDALONE=false -e MIRROR_SOURCE=https://registry-1.docker.io -e MIRROR_SOURCE_INDEX=https://index.docker.io -v /Users/v11/Documents/docker-mirror:/mirror --restart=always --name mirror registry
接下来,我拉新的图像,例如:
docker pull ubuntu
据我以前不工作可言,因为我不能在我的路找到像“/用户/ V11 /文档/泊坞窗-镜子”。我打印镜像日志信息,它会告诉我的错误信息:
ConnectionError: HTTPSConnectionPool(host='index.docker.io', port=443): Max retries exceeded with url: /v1/repositories/library/hello-world/images (Caused by : [Errno 110] Connection timed out)
和搬运工日志:
INFO[0023] POST /v1.19/images/create?fromImage=hello-world%3Alatest ERRO[0027] Unable to create endpoint for http://10.11.150.76:5555/ : invalid registry endpoint https://10.11.150.76:5555/v0/ : unable to ping registry endpoint https://10.11.150.76:5555/v0/ v2 ping attempt failed with error: Get https://10.11.150.76:5555/v2/ : EOF v1 ping attempt failed with error: Get https://10.11.150.76:5555/v1/_ping : EOF. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add
--insecure-registry 10.11.150.76:5555
to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/10.11.150.76:5555/ca.crt
我真的搜索到很多相关的问题找到解决。但我仍然不知道。怎么做?谢谢。
这看起来像是一个连接问题,我会在'--insecure-registry http://10.11.150.76:5555'中删除'http://'。尝试使用Web浏览器或邮件服务器等专用工具浏览web服务以确保服务可用 – superbob
@superbob我试图删除“http://”,但它仍然没有工作 – v11
您是否尝试过我其他建议? – superbob