Managing multi-version application

Hi.

I’m having a common problem: an application with multiple release streams (1.x, 2-alpha, 2.x to come soon) that needs to be dockerized and pushed to the hub. Of course, handwriting of all Dockerfiles and scripts is totally not an option, and i’m a little bit lost in strategies for releasing (i don’t like folder-for-tag option, and branch/tag rewrites of git repositories are not atomic and possibly will trigger failed builds). Is there a common document with best strategies described lying anywhere around?