At Wongnai, we build image from our CI tool. The images are tagged with build number before pushing so we can track the running version in the image field of Kubernetes.
However, this result in a lot of leftover images stored in the builder Docker and so this project was born.
Suppose you have the following images:
and you execute
sudo docker run -v /var/run/docker.sock:/var/run/docker.sock --rm willwill/imagecleanup \
--numbered test --numbered-keep 2
This will remove all images but
Images within other repository are unaffected.
Content type
Image
Digest
Size
49.7 MB
Last updated
about 10 years ago
docker pull willwill/imagecleanup