Clone an image from a docker registry to another

我是研究僧i 提交于 2019-12-04 18:24:08

问题


I have a private registry with a set of images. It can be visualized as a store of applications. My app can take these applications and run them on other machines. To achieve this, my app first pull the image from the private registry and then copies it to a local registry for later use.

Step as are follow:

docker pull privateregistry:5000/company/app:tag
docker tag privateregistry:5000/company/app:tag localregistry:5000/company/app:tag
docker push localregistry:5000/company/app:tag

Then later on a different machine in my network:

docker pull localregistry:5000/company/app:tag

Is there a way to efficiently copy an image from a repository to another without using a docker client in between ?


回答1:


you can use docker save to save the images to tar archive and then copy the tar to new host and use docker load to untar it.

read below links for more https://docs.docker.com/engine/reference/commandline/save/



来源:https://stackoverflow.com/questions/44974656/clone-an-image-from-a-docker-registry-to-another

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!