#Docker images cleanup

By | September 17, 2017

CASE 1: If you use multi-stage docker builds you will end up with lots of un-tagged images.

The proper way to clean the intermediary leftover images is:

CASE 2: If you want to clean up all the old images for which you no longer have any instantiated container

CASE 3: If you want to delete all stopped containers and their images

Note: Be very careful the above will remove ALL stopped containers, so make sure that if you want to keep a container alive it has to be running when commands are issued.

Advertisements

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.