简体   繁体   中英

What are the risks to Google Container Registry if the project name is changed?

I have a CI/CD pipeline configured where Google Cloud Build automatically builds containers from code pushed to a GitHub repo if tagged with a specific tag. The containers are automatically deposited into Google Container Registry. Each container in the registry is tagged with a tag in the form us.gcr.io/project_name/container_name:tag_name

My question is if I change the project name, how will this affect the containers currently sitting in Google Container Registry that I have already tagged with the current project name? Do I need to change the tag on each container with the intended project name before updating the project name itself? Is this handled automatically by GCP?

Registries in Container Registry are named by the host and project ID . To work with images (for example push, pull, delete) identify the image using the following format:

[HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG]

Or [HOSTNAME]/[PROJECT-ID]/[IMAGE]@[IMAGE_DIGEST]

Even if you change your PROJECT NAME, PROJECT ID can't be changed, because Project ID: a unique identifier for your project, composed of the project name and a randomly assigned number . So your images keep with the same registries in Container Registry. us.gcr.io/project_id/container_name:tag_name

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM