簡體   English   中英

推送Docker私有注冊表

[英]Push in docker private registry

我正在關注https://docs.docker.com/registry/deploying/並且我已經在docker.tp.cselt.it上安裝了私有Docker注冊表

> 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

在另一台計算機上,我試圖在該注冊表上推送映像(hello-world):

> 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

現在,在第一台機器(docker.tp.cselt.it)上:

> 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

但是當我跑步時:

> curl -u testuser:testpassword -X GET http://docker.tp.cselt.it:5000/v2/_catalog --noproxy docker.tp.cselt.it

我收到 ””

怎么了?

里卡多

curl --noproxy docker.tp.cselt.it -u testuser:testpassword --insecure -X GET  https://docker.tp.cselt.it:5000/v2/_catalog
{"repositories":["hello-world"]}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM