google-cloud-java
google-cloud-java copied to clipboard
How do you delete a docker image from Artifact Registry?
I have worked out how to list images (and also worked out to list and delete maven and npm packages) but I can't work out what the correct way to delete a docker image is?
I have tried using deleteVersionAsync and deleteTag with various combinations of image path and tag or image path with sha etc but none work and the resulting callable fails with an illegal parameter.
For now I have got it working by calling ProcessBuilder and executing the gcloud command manually but surely you can do this using the api?
What is the api call for the equivalent of this:
gcloud container images delete europe-west2-docker.pkg.dev/my-project/docker/my-image@sha256:b123456789 --force-delete-tags --quiet
Many thanks.