I have pushed container images using gcloud docker push
to the Google Container Registry. Two questions:
How do I cleanly remove a pushed container image from the registry? (I know I can remove a tag to an image and make it not accessible anymore.)
There are a bunch of Docker layers that an image brings with it. I want to remove all the unused layers with an image deletion.
UPDATE: You can now delete individual container images straight from the UI.
As of Nov 2015: There is no way to currently delete a single container image from the registry cleanly. Right now, it is basically all or nothing. The GCR team is working on this!Original Answer: I can't think of an easy way to delete individual images. You can delete ALL of the images by deleting the Cloud Storage bucket with
gsutil rb gs://artifacts.<PROJECT-ID>.appspot.com
. You can also use the storage browser and try to delete individual parts (https://console.developers.google.com/storage/browser/artifacts..appspot.com) but you would have to know the Docker hashes for each layer!