How to remove all data from a Docker Registry from cli?

168 Views Asked by At

I have a dedicated server hosting a docker registry.

How can I remove all tags, images, payloads, data using standard docker commands ?

1

There are 1 best solutions below

0
On

The short answer is you can't.

Unless you are requesting how to clean the registry if it is in a docker container and you are logged in the server. In this case just delete the container, the volume and run the container from scratch.

The log answer is. You can enable in the registry, an option to allow delete an image if you issue a HTTP DELETE request against the registry. Also the registry version 2.1 and later allows to run a garbage collection command if you are logged in the server.

Hope it helps