我正在尝试使用以下图像设置私有docker注册表:https: //github.com/docker/docker-registry
只需运行:
docker run -p 5000:5000 registry
我只能从localhost拉/从这个存储库推送/但是如果我尝试从另一台机器上访问它(使用同一局域网上的私有地址),它会失败并显示错误消息:
*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*
Run Code Online (Sandbox Code Playgroud)
令我发疯的是我可以使用:curl 10.0.0.26:5000
和/或成功访问它
curl 10.0.0.26:5000/v1/search
我也不明白我应该在哪里以及如何通过--insecure-registry国旗.
我刚开始学习码头工具.
我有一个私人注册表在一台服务器(server1)上运行,并可以通过键入以下内容从server1上提取测试图像:
docker pull 127.0.0.1:5000/test
Run Code Online (Sandbox Code Playgroud)
但是,当我从另一台服务器键入上述命令时,我收到以下错误消息:
Error: Invalid Registry endpoint: Get http://127.0.0.1:5000/v1/_ping: dial tcp 127.0.0.1:5000: connection refused
Run Code Online (Sandbox Code Playgroud)
我在配置中遗漏了什么吗?
任何帮助表示赞赏.
谢谢!
我已经安装了docker 1.11.2,我正在尝试为我们的办公室制作一个私有注册表。
我按照此链接进行了私有注册,我已经成功地从本地主机中拉出,但是我仍然试图从远程计算机中拉出。
我所做的简短说明
步骤1 :
docker run -d -p 5000:5000 --restart=always --name registry registry:2
Run Code Online (Sandbox Code Playgroud)
第2步:
[root@raj raj]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest c54a2cc56cbb 11 days ago 1.848 kB
registry 2 8ff6a4aae657 4 weeks ago 171.5 MB
Run Code Online (Sandbox Code Playgroud)
第三步:(对于本地主机)
[root@raj raj]# docker tag hello-world localhost:5000/hello-world
[root@raj raj]# docker push localhost:5000/hello-world
The push refers to a repository [localhost:5000/hello-world]
a02596fdd012: Pushed
latest: digest: sha256:a18ed77532f6d6781500db650194e0f9396ba5f05f8b50d4046b294ae5f83aa4 size: 524
Run Code Online (Sandbox Code Playgroud)
第四步:
[root@raj raj]# docker pull localhost:5000/hello-world
Using default tag: …Run Code Online (Sandbox Code Playgroud)