将映像从Docker注册表克隆到另一个 [英] Clone an image from a docker registry to another
问题描述
我有一个带有一组图像的私人注册表。可以将其可视化为应用程序存储。
我的应用程序可以使用这些应用程序并在其他计算机上运行它们。
为此,我的应用程序首先从私有注册表中提取了图像,然后将其复制到本地注册表中以备后用。
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.
步骤如下:
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
有没有一种方法可以有效地将存储库中的映像复制到另一个存储库中,而无需使用docker client? / p>
Is there a way to efficiently copy an image from a repository to another without using a docker client in between ?
推荐答案
您可以使用 docker save
将图像保存到tar存档,然后将tar复制到新主机上,并使用 docker load
对其进行解压缩。
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.
阅读以下链接,了解更多
> https://docs.docker.com/engine/reference/commandline/save/
read below links for more https://docs.docker.com/engine/reference/commandline/save/
这篇关于将映像从Docker注册表克隆到另一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!