To list all the docker images that are created before a particular image follow the below command:
docker images --filter "before=<name_of_image>"
Example
docker images --filter "before=python3.7"
To List all the docker images that are created after a particular / specified image, follow the below command:
docker images --filter "since=<name_of_image>"
Example
docker images --filter "since=ubuntu:18.04"
Also Read:
List all Docker Containers