Skip to content

Instantly share code, notes, and snippets.

@herpiko
Created December 18, 2018 01:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save herpiko/5aaea0f3c137a1cb618023ec81671048 to your computer and use it in GitHub Desktop.
Save herpiko/5aaea0f3c137a1cb618023ec81671048 to your computer and use it in GitHub Desktop.
Delete image from private registry

Get the identifier first,

curl -v --silent -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -X GET http://localhost:5000/v2/cdl/oa/oa-frontend-pkblu-v1/manifests/master 2>&1 | grep Docker-Content-Digest | awk '{print ($3)}'

Then delete it

curl -v --silent -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -X DELETE http://127.0.0.1:5000/v2/cdl/oa/oa-frontend-pkblu-v1/manifests/sha256:ae7a8a9605becc07c244e476c5430f800adc8f0e7b669fd596975a70bd102e1b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment