Using the Docker "before" Filter to Remove Multiple Images

I recently needed to cleanup a bunch of old Docker images on a VM that I run in Azure. While I could remove each image one by one using the standard docker rmi [IMAGE IDS] command, removing multiple images all at once as a batch was preferable. It turns out that removing a specific range of images is fairly straightforward using the “before” filter. You can do the following to list all images that exist before a particular image: Running the command will show all of the images that existed before the danwahlin/nginx-codelabs:1.15 image (basically the older images). Once you […]