Skip to content

If you are running a private v2 docker registry, and you are storing your data on disk, running this bash script from the machine where the data lives will let you fully delete an image or tag

Notifications You must be signed in to change notification settings

ermitovski/delete-docker-registry-image

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

If you are running a private v2 docker registry, and you are storing your data on disk, running this bash script from the machine where the data lives will let you fully delete an image or tag

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 92.8%
  • Python 7.2%