问题
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