Reputation: 733
I am trying to migrate from gitlab-ce to gitlab.com. This includes Docker registry as well. What I need to migrate Gitlab Docker Registry to hosted Docker registry (Nexus3). This might be manually done I imagine, but is there any more efficient way to do it?
Upvotes: 1
Views: 839
Reputation: 6442
Normally I used the following workflow for each tag:
docker pull SRC_REGISTRY_HOST/<REPOSITORY:TAG
docker tag SRC_REGISTRY_HOST/<REPOSITORY:TAG DEST_REGISTRY_HOST/<REPOSITORY:TAG
docker push DEST_REGISTRY_HOST/<REPOSITORY:TAG
But I couldn't find it clean so I wrote a small tool to automate all the steps and just use the following:
docker run --rm -it smqasims/imagesync --src SRC_REGISTRY_HOST/<REPOSITORY> --dest DEST_REGISTRY_HOST/<REPOSITORY
This will sync both the repositories and is faster/manageable compared to the other workflow.
Upvotes: 1