最佳答案
我正在尝试设置一个私人码头注册表使用的图像来自: Https://github.com/docker/docker-registry
仅仅通过跑步:
docker run -p 5000:5000 registry
我只能从 localhost 将/push 从/推到这个存储库,但是如果我试图从另一台机器(使用同一个 LAN 上的私有地址)访问它,它会失败并发出错误消息:
*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标志。