What is the best way to put on a repository for a docker image with multiple tags?
If you think of the Dockerfile as a kind of "bill of materials" for your containers, then there is the following consideration:


container environments are mostly same - you can use many Dockerfiles in same folder, or even just one Dockerfile with parametrized builds
container environments are or might divert in terms of further "local assembly parts" configuration files, scripts etc., then you are better off with using separate folders.


Branching has rather to do with developing versions, or also independent features which then should be anyway merged together. See Git flow on this topic.

As a reference project laoyut, check for example the GitHub project linked from Tomcat Docker Hub site. Here you find different folders, even with single Dockerfiles.

See also this TeX-Docker distro:


https://hub.docker.com/r/raabf/texstudio-versions/


Side note: strange enough there is no "official" Docker distro for TeX, while many other well established open source communities have this library entry.