'list all docker images based on the same stage

I have many images with the same base stage, i.e.

FROM x as base
# ...
FROM base
ARG final_build_arg
# ...

How can I list all images that are based on this base? I was thinking about using the ancestor filter (docker ps --filter ancestor=?), but is there some way to name the base stage?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source