[英]Docker push to private registry from other server
Please, I have a problem pushing docker image to a private repository. 请,我在将Docker映像推送到私有存储库时遇到问题。
Repository: IP 192.168.1.40 Docker Machine 1: 192.168.1.41 Docker Machine 2: 192.168.1.42 存储库:IP 192.168.1.40 Docker机器1:192.168.1.41 Docker机器2:192.168.1.42
When I do the server where I have a docker repository (40): 当我在有Docker存储库的服务器上运行时(40):
docker pull busybox
docker tag bussybox 192.168.1.40:5000/busybox
docker push 192.168.1.40:5000/busybox
So it is between images: busybox 192.168.1.40:5000/busybox 因此它位于图像之间:busybox 192.168.1.40:5000/busybox
When I enter the machine (.41) docker pull 192.168.1.40:5000/busybox it will download me from server 40 The same on server 42. (download from 40) 当我进入机器(.41)docker pull 192.168.1.40:5000/busybox时,它将从服务器40下载我,与服务器42相同。(从40下载)
But if I want to do it the opposite, it does not work. 但是,如果我想相反地做,那就行不通了。 When I delete the imgs on machine 40 and run only docker registry and on machine 41 I will enter:
当我在机器40上删除imgs并仅运行docker Registry并在机器41上运行时,我将输入:
docker pull busybox
docker tag busybox 192.168.1.40:5000/busybox
docker push 192.168.1.40:5000/busybox
It does not send it, but it saves it on the current server (41). 它不发送它,但是将其保存在当前服务器上(41)。
Server 41 服务器41
busybox 192.168.1.40:5000/busybox busybox 192.168.1.40:5000/busybox
Server40 Server40
only registry images 仅注册表映像
How do I fix it? 我如何解决它?
I need to create img (pull, build Dockerfile) on server 41 and send (docker push 192.168.1.40:5000/name) to the repository (40). 我需要在服务器41上创建img(拉动,构建Dockerfile),然后将docker push 192.168.1.40:5000/name发送到存储库(40)。 Then I want to download this img (saved on 40) to other servers (42,43,44 .... docker pull)
然后我想将此img(保存于40)下载到其他服务器(42、43、44 .... docker pull)
Ssh on the other machines(41,42,43,44) and use: 在其他机器(41,42,43,44)上使用SSH并使用:
docker pull 192.168.1.40:5000/busybox
to pull the image from the registrie host(40). 从注册主机获取图像(40)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.