Repository "containers" not found

I am trying to follow the standard GCP beginner guide how to modify and deploy changes to the dynamic web app.

On step 10 (Build a server container image, 2), I am executing command

cd ~/avocano/
gcloud builds submit --config \
    provisioning/server.cloudbuild.yaml
And after multiple steps it's trying to push the image that has been built and then fails
PUSH
Pushing europe-west1-docker.pkg.dev/***-***-***/containers/server
The push refers to repository [europe-west1-docker.pkg.dev/***-***-***/containers/server]
...
name unknown: Repository "containers" not found

I have changed us-docker.pkg.dev to europe-west1-docker.pkg.dev since it's where I am deploying to but it did not help to resolve the issue. Any ideas what went wrong?

Also submitted as https://github.com/GoogleCloudPlatform/avocano/issues/412

2 4 419
4 REPLIES 4

Hi @AndyF,

Welcome to the Google Cloud Community!

Can you send here the link of the guide that you are using? Thank you.

Hi, this was one of pop-up options after deploying this example solution https://cloud.google.com/solutions/dynamic-website?hl=en The popup is not showing atm and I don't believe there is a link to it.

Well, I just created a new project and deployed the jumpstart solution, then looked at the html and found the link https://walkthroughs.googleusercontent.com/tutorial/iframe-angular.html/?walkthrough_id=solutions-in...

Tried the step 10 again and it is failing in the new project too.

Hi @AndyF,

I believe a GCP engineer contributing to the project has replied to your issued ticket in GitHub

Thanks for reporting this issue, @andreif.

As part of this application migrating from using Container Registry (available by default on all projects) to Artifact Registry, it looks like the deployment method you used didn't create the registry. At the moment, this application presumes using the US multi-region for this registry (resulting in us-docker.pkg.dev URLs).

The workaround for now is to run the setup script:


gcloud artifacts repositories create containers \
    --repository-format=docker \
    --location=us
 

The more correct solution is for the deployment to create this artifact registry for you, respecting the region selected, and ensuring all scripts reference the region selection.

(Developer note: the avocano-based setup creates the artifact registry, but the terraform-based setup doesn't, relying on the pre-created container for deployment. The registry should be created on deployment, noting it won't be used. Alternatively, the registry should be created before this gcloud builds submit step of this tutorial)