Skip to content

Latest commit

 

History

History
26 lines (14 loc) · 849 Bytes

README.md

File metadata and controls

26 lines (14 loc) · 849 Bytes

delete-docker-registry-image

Install

curl https://raw.githubusercontent.com/burnettk/delete-docker-registry-image/master/delete_docker_registry_image | sudo tee /usr/local/bin/delete_docker_registry_image >/dev/null
sudo chmod a+x /usr/local/bin/delete_docker_registry_image

Run

Set up your data directory via an environment variable:

export REGISTRY_DATA_DIR=/opt/registry_data/docker/registry/v2

You can also just edit the script where this variable is set to make it work for your setup.

Almost delete a repo:

delete_docker_registry_image --image testrepo/awesomeimage --dry-run

Actually delete a repo (remember to shut down your registry first):

delete_docker_registry_image --image testrepo/awesomeimage

Delete one tag from a repo:

delete_docker_registry_image --image testrepo/awesomeimage:supertag