I have 2 private docker repositories. Is any way how can I copy one image from one repository to the second one?
In order to transfer a Docker image from one server to another, what you need to do is first export the image to a file, then copy that file over from your current server to the new one using scp or rsync and finally load the image to your new server.
To share Docker images, you have to use a Docker registry. The default registry is Docker Hub and is where all of the images we've used have come from. A Docker ID allows you to access Docker Hub which is the world's largest library and community for container images. Create a Docker ID for free if you don't have one.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With