[英]Docker private registry issue
I run private registry on UBUNTU 14.04 : 我在UBUNTU 14.04上运行私有注册表:
docker run -d -p 5000:5000 registry
docker run -d -p 5000:5000注册表
The proces appeard on my docker proces list. 该程序出现在我的docker进程列表中。 I wrote command : curl my-external-ip and I got this:
我写了命令: curl my-external-ip我得到了这个:
"\\"docker-registry server\\""
“\\”docker-registry server \\“”
THE PROBLEM IS that when I try to push image on localhost it works fine, but after I want to push to external ip (It must be available for for more people) I got this: 问题是 ,当我尝试在localhost上推送图像时,它工作正常,但在我想推送到外部IP(它必须可供更多人使用)后,我得到了这个:
The push refers to a repository [MY-EXTERNAL-IP:5000/hello] (len: 1) unable to ping registry endpoint https://MY-EXTERNAL-IP:5000/v0/ v2 ping attempt failed with error: Get https://MY-EXTERNAL-IP:5000/v2/ : EOF v1 ping attempt failed with error: Get ht*ps://MY-EXTERNAL-IP:5000/v1/_ping: EOF
推送是指存储库[MY-EXTERNAL-IP:5000 / hello](len:1)无法ping注册表端点https:// MY-EXTERNAL-IP:5000 / v0 / v2 ping尝试失败,错误:获取https :// MY-EXTERNAL-IP:5000 / v2 / :EOF v1 ping尝试失败,错误:获取ht * ps:// MY-EXTERNAL-IP:5000 / v1 / _ping:EOF
I am using proxy at my company, but I added export http_proxy, https_proxy, ftp_proxy to my docker file and --insecure-registry . 我在我的公司使用代理,但我添加了导出http_proxy,https_proxy,ftp_proxy到我的docker文件和--insecure-registry 。
It seems like your Docker daemon still doesn't understand that registry on your $EXTERNAL_IP
should be accessed over HTTP rather than HTTPS. 看起来你的Docker守护进程仍然不明白你的
$EXTERNAL_IP
上的注册表应该通过HTTP而不是HTTPS来访问。 You need to be sure that daemon runs with the --insecure-registry $EXTERNAL_IP
option: 您需要确保守护程序使用
--insecure-registry $EXTERNAL_IP
选项运行:
ps aux | grep docker
If you'll not be able to find it there, you probably made a mistake in your DOCKER_OPTIONS
. 如果你无法在那里找到它,你可能在你的
DOCKER_OPTIONS
犯了一个错误。
It looks that your docker daemon can't access docker registry(your-external-ip) through https
protocol(usually it uses 443 port). 看起来您的docker守护程序无法通过
https
协议访问docker注册表(your-external-ip)(通常它使用443端口)。 Maybe you can check it first. 也许你可以先检查一下。
But with insecure mode, the network occured on http protocol. 但是在不安全的模式下,网络出现在http协议上。 So you can tell you docker daemon to trust insecure-registry.
所以你可以告诉你docker守护进程信任insecure-registry。
Try to run docker daemon with --insecure-registry="YOUR_EXTERNAL_IP"
尝试使用
--insecure-registry="YOUR_EXTERNAL_IP"
运行--insecure-registry="YOUR_EXTERNAL_IP"
守护程序
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.