Move images between repositories
Consolidating and organizing your Docker images across repositories can streamline your workflows, whether you're managing personal projects or contributing to an organization. This topic explains how to move images between Docker Hub repositories, ensuring that your content remains accessible and organized under the correct accounts or namespaces.
For bulk migrations, multi-arch images, or scripted workflows, see Bulk migrate Docker images.
Personal to personal
When consolidating personal repositories, you can pull private images from the initial repository and push them into another repository owned by you. To avoid losing your private images, perform the following steps:
-
Sign up for a new Docker account with a personal subscription. (Be sure to verify your account after you've signed up.)
-
Sign in to Docker using your original Docker account
-
Pull your images:
$ docker pull namespace1/docker101tutorial -
Tag your private images with your newly created Docker username, for example:
$ docker tag namespace1/docker101tutorial new_namespace/docker101tutorial -
Using
docker loginfrom the CLI, sign in with your newly created Docker account, and push your newly tagged private images to your new Docker account namespace:$ docker push new_namespace/docker101tutorial
The private images that existed in your previous account are now available in your new account.
Personal to an organization
To avoid losing your private images, you can pull your private images from your personal account and push them to an organization that's owned by you.
The private images that existed in your user account are now available for your organization.
谢谢你的反馈!