Hi I want to delete a docker image from my private registry the steps that I did was:
I already did what the solution of How can I use the Docker Registry API V2 to delete an image from a private registry? recommended and it did not work
I did a HEAD request to get the Docker-Content-Digest
curl --cacert ~/Documents/certificates//ca.pem --key ~/Documents/certificates//key.pem --cert ~/Documents/certificates/certificate.p12 --pass certpass -I https://myprivateregistry/v2/imagename/manifests/tag
Then using the Dcker-content-digest from the previous step I did a delete request:
curl --cacert ~/Documents/certificates//ca.pem --key ~/Documents/certificates//key.pem --cert ~/Documents/certificates/certificate.p12 --pass certpass --header "Accept: application/vnd.docker.distribution.manifest.v2+json" -X DELETE https://myprivateregisty/v2/imagename/manifests/dockercontentdigestgotfrompreviousstep
I got this error:
{"errors":[{"code":"MANIFEST_UNKNOWN","message":"manifest unknown"}]}
In all likelihood, it means, that you have deleted the manifest, and this is right first step. To delete actual data from disk, you need to run docker registry garbage collector on registry host machine.
The info is from that comment
Also, as some adv, I want to propose you to check my docker registry web UI =) There is the possibility to delete an images from registry right with that UI.