Reputation: 19830
I have 2 private docker repositories. Is any way how can I copy one image from one repository to the second one?
Upvotes: 67
Views: 57592
Reputation: 239
Found this question when looking for a way to copy an image from local docker registry on host-a
to local docker registry on host-b
. If you have SSH access to host-b
this should work:
user@host-a:~$ docker image save "repository:tag" | ssh host-b "docker image load"
Upvotes: 0
Reputation: 3945
You can pull the image, tag it and push it to the new registry.
Example:
docker pull old-registry/app:some_tag
docker tag old-registry/app:some_tag new-registry/app:some_tag
docker push new-registry/app:some_tag
Upvotes: 156
Reputation: 930
Can be done with https://github.com/containers/skopeo
Example for the README:
skopeo copy docker://quay.io/buildah/stable docker://registry.internal.company.com/buildah
The advantage is that Skopeo does not require Docker on the machine it runs on.
Upvotes: 29