Search code examples
dockergoogle-cloud-platformcontainersgoogle-container-registry

Delete image on GCP - not working via UI nor via gcloud cli


I am an owner of a project in GCP in which there I currently only one image in my Container Registry. I am trying to delete it but it shows that I have no permission to do that. enter image description here

Any idea why is that?

When trying to run the delete with gcloud I am getting a validation error:

enter image description here


Solution

  • One potential reason is that you're impacted by the current opened issue on Container Registry. It's impossible to delete an image via the Console UI.

    See below message from GCP:

    Project owners and editors are currently unable to edit tags or delete images in the Container Registry UI. The workarounds are to either use the command line or grant the Storage Object Viewer IAM role. A fix is expected by December 5th.

    enter image description here

    In this case, workaround is to delete the image with gcloud command line :

    gcloud container images delete gcr.io/...
    

    Be careful here not to confuse with gcloud compute images which permits to manage VMs images on Google Cloud Compute.