I'm struggling with the conception of a sensible tagging/naming convention for my project. I would definitely like to use semantic versioning, i.e. tagging the production image as x.y.z, where x is the major, y is the minor and z is the patch version.
Overall, I have three stages: DEV, QA and PROD. The process is as follows:
What I need now is a strategy, how I can achieve a semantic versioning with labels. Initially our Maven pom has the version 1.0.0-SNAPSHOT and the maven-docker-plugin replaces that with the label latest before tagging the Docker image. What I would like for my first PROD image is the tag 1.0.0. What is the suggestion for the version number of the QA image? 1.0.0-RC? I guess, it would be best, if I build the the image only once - before deploying to DEV - and subsequently only tag and deploy it to the remaining two stages?
Overall: is or should there be a difference in versioning between the Maven and the Docker image?
Thanks in advance!