我正在尝试使用从https://github.com/docker/docker-registry获取的镜像建立一个私有Docker注册表。
只需运行以下命令:
docker run -p 5000:5000 registry
我只能在本地主机上从该存储库中拉取/推送,但如果我尝试从另一台机器(使用同一局域网下的私有地址)访问它,则会出现错误信息。
*2014/11/03 09:49:04 Error: Invalid registry endpoint https ://10.0.0.26:5000/v1/':
Get https:// 10.0.0.26:5000/v1/_ping: Forbidden. If this private
registry supports only HTTP or HTTPS with an unknown CA certificate,
please add `--insecure-registry 10.0.0.26:5000` 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.0.0.26:5000/ca.crt*
让我感到疯狂的是,我可以使用以下命令成功访问它:
curl 10.0.0.26:5000
和/或 curl 10.0.0.26:5000/v1/search
同时,我也不明白在哪里以及如何传递--insecure-registry
标志。