我正在关注https://docs.docker.com/registry/deploying/,我已经在docker.tp.cselt.it上安装了私人码头注册表
array
在另一台机器上,我正试图在该注册表上推送一个图像(hello-world):
> sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
registry 2 65b0a3f42eef 7 days ago 165.8 MB
dockerui/dockerui latest 95c8b9dc91e0 6 weeks ago 6.13 MB
> sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e142b5f0933e registry:2 "/bin/registry /etc/ 7 minutes ago Up 7 minutes 0.0.0.0:5000->5000/tcp registry
1d5c9e515118 registry:2 "htpasswd -Bbn testu 7 minutes ago Exited (0) 7 minutes ago romantic_jang
ae7b5d62628f dockerui/dockerui:latest "/dockerui" About an hour ago Up About an hour 0.0.0.0:9000->9000/tcp goofy_meitner
现在,在第一台机器上(docker.tp.cselt.it):
> docker login docker.tp.cselt.it:5000
Username (testuser):
WARNING: login credentials saved in /home/administrator/.docker/config.json
Login Succeeded
> docker pull hello-world
Using default tag: latest
latest: Pulling from library/hello-world
b901d36b6f2f: Pull complete
0a6ba66e537a: Pull complete
Digest: sha256:8be990ef2aeb16dbcb9271ddfe2610fa6658d13f6dfb8bc72074cc1ca36966a7
Status: Downloaded newer image for hello-world:latest
> docker tag hello-world docker.tp.cselt.it:5000/hello-world
> docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
docker.tp.cselt.it:5000/hello-world latest 0a6ba66e537a 5 months ago 960 B
hello-world latest 0a6ba66e537a 5 months ago 960 B
> docker push docker.tp.cselt.it:5000/hello-world
The push refers to a repository [docker.tp.cselt.it:5000/hello-world] (len: 1)
0a6ba66e537a: Image already exists
b901d36b6f2f: Image already exists
latest: digest: sha256:1c7adb1ac65df0bebb40cd4a84533f787148b102684b74cb27a1982967008e4b size: 2744
但是当我跑步时:
> sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
registry 2 65b0a3f42eef 7 days ago 165.8 MB
dockerui/dockerui latest 95c8b9dc91e0 6 weeks ago 6.13 MB
> sudo docker exec -it 65b0a3f42eef bash
> ls /var/lib/registry/docker/registry/v2/repositories/
centos hello-world ubuntu
我收到“”
怎么了?
的Riccardo
答案 0 :(得分:0)
curl --noproxy docker.tp.cselt.it -u testuser:testpassword --insecure -X GET https://docker.tp.cselt.it:5000/v2/_catalog
{"repositories":["hello-world"]}