You can use variables in the FROM statement (recent docker versions).
The problem is, Docker official images (e.g. alpine, ubuntu, debian, python, node, etc) don't do this, so every Dockerfile that uses those as a base needs to be edited by hand, and you have to trust someone for unofficial base images (or build and maintain them on your own).