Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCR to Google Artifact registry migration using gcloud artifacts docker upgrade migrate command #513

Open
himalhewagamage opened this issue Jan 22, 2025 · 0 comments

Comments

@himalhewagamage
Copy link

I need to migrate Google Container Registry (GCR) images to Google Artifact Registry. Currently, we have GCR images hosted in a central project (central-shared-services), which contains multiple service image repositories organized by different project names. To perform the migration, I attempted to use the gcloud artifacts docker upgrade migrate command, as shown below.

Google provides the following command syntax:
gcloud artifacts docker upgrade migrate --from-gcr=gcr-host/project-id --to-pkg-dev=project-id/repository-id

Here is the specific command I used:
gcloud artifacts docker upgrade migrate --from-gcr=asia.gcr.io/central-shared-services --to-pkg-dev=central-shared-services/application-repo-id

When I run this command, the images are successfully copied to the destination location. However, the destination paths are different from what I expected. Since the central-shared-services project contains multiple repositories, all repositories are being migrated into the single application-repo-id repository. This results in image paths such as:

central-shared-services/application-repo-id/project-1-repo
central-shared-services/application-repo-id/project-2-repo

The central-shared-services project contains more than 300 repositories, so managing them in this structure becomes challenging.

Is this behavior a bug in the gcloud migration tool? Alternatively, is there a way to map the source repositories to identical destination repositories during the migration to maintain a one-to-one mapping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant