Hi Google Cloud Community,
I'm having trouble migrating images from Container Registry (GCR) to Artifact Registry using the gcloud artifacts docker upgrade migrate command. Here's what I tried and the issues I'm facing:
When I list repositories in my Container Registry using:
gcloud container images list --repository=eu.gcr.io/PROJECT_ID
I see the following output:
eu.gcr.io/PROJECT_ID/[FOLDER_NAME1]
eu.gcr.io/PROJECT_ID/[FOLDER_NAME2]
...
Each folder/container contains all my docker images
However, when I attempt to migrate using:
gcloud artifacts docker upgrade migrate --copy-only --projects=PROJECT_ID
The command outputs:
PROJECT_ID: Successfully copied 0 additional tags and 0 additional manifests. There were 0 failures.
Basically it copied nothing.
I tried the command with different parameters:
--from-gcr=eu.gcr.io/PROJECT_ID
--to-pkg-dev=PROJECT_ID/REPOSITORY_NAME
However, the migration fails with the error.....Repository "REPOSITORY_NAME" not found.
This happens even though I manually created the repository via the Google Cloud Console.
What i would like to achieve is copy all the images from the container registry to the artifact registry and keep the folder/repo structure like in the container registry.
I also created a simple bash script which:
1. runs gcloud container images list --repository=eu.gcr.io/PROJECT_ID
2. for each [FOLDER_NAME] creates a new repository at the artifact registry
But how do i migrate the docker images "automatically" by running the migration command provided by gcloud? Am i using the wrong parameters?