[英]accessing docker private registry
I have my private docker registry running on a remote machine, which is secured by TLS and uses HTTPS. 我有一个在远程计算机上运行的私有docker注册表,该注册表由TLS保护并使用HTTPS。 Now I want to access it from my local docker-machine installed on Windows 7. I have copied the certificates to "/etc/docker/certs.d/" in the docker-machine VM and restarted docker.
现在,我想从Windows 7上安装的本地docker-machine中访问它。我已将证书复制到docker-machine VM中的“ /etc/docker/certs.d/”,然后重新启动了docker。
After this I can successfully login to my private registry using credentials, but when I try to push an image to it, it gives me a certificate signed by unknown authority
error. 之后,我可以使用凭据成功登录到我的私有注册表,但是当我尝试向其推送映像时,它会给我一个
certificate signed by unknown authority
错误certificate signed by unknown authority
的certificate signed by unknown authority
。 After researching a little I restarted the docker daemon with docker -d --insecure-registry https://<registry-host>
, and it worked. 经过研究后,我使用
docker -d --insecure-registry https://<registry-host>
重新启动了docker -d --insecure-registry https://<registry-host>
守护进程,并且该命令起作用了。
My question is: if I have copied my certificates to the host machine, why do I need to start the registry with the --insecure-registry
option? 我的问题是:如果我已将证书复制到主机,为什么需要使用
--insecure-registry
选项启动--insecure-registry
?
I can only access the registry from another host with certificates as well as restarting docker with --insecure-registry
, which looks a little wrong to me. 我只能从带有证书的另一台主机访问注册表,也只能使用
--insecure-registry
重新启动--insecure-registry
,这对我来说有点不对劲。
Docker version: 1.8.3 Docker版本:1.8.3
Any pointers on this would be really helpful. 任何有关此的指示将非常有帮助。
If you would like to access your registry with HTTP, follow the instructions here 如果您想使用HTTP访问注册表,请按照此处的说明进行操作
Basically (do this on the machine from
which you try to access the registry): 基本上,(这样做在机器上
from
您尝试访问注册表):
DOCKER_OPTS="--insecure-registry myregistrydomain.com:5000"
(or add that to existing DOCKER_OPTS) DOCKER_OPTS="--insecure-registry myregistrydomain.com:5000"
,以使一行显示为: DOCKER_OPTS="--insecure-registry myregistrydomain.com:5000"
(或将其添加到现有的DOCKER_OPTS中) service docker stop
&& service docker start
service docker stop
&& service docker start
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.