The title of the question defines images , not containers. For those who stumbled upon this question while looking at deleting all but one of the images , you can use docker prune along with filter flags:
docker image prune -a --force --filter "label!=image_name"
replacing filename with the name of your image.
You can also use the do = flag to crop images by date.
source share