There is currently no way to clean up old docker images from a hosted repository.
Docker images can be very large, and are often deployed in environments where access to older versions of an image is not necessary.
There should be a scheduled task to clean up old hosted docker images, and to also clean up layers which are no longer used by any hosted images.
- A user will be able to purge Docker images older than X days from a Docker hosted repository
- Since Docker images share layers we can't remove all of the layers attached to the image, we have to remove them after we know they aren't used anymore
- As a part of removing the old images, we should clean up all orphaned layers
- More info on how Docker is handling deletes: https://github.com/docker/distribution/blob/master/ROADMAP.md#deletes