ewolff/microservice

Q: How to best deal with artefact versioning in Dockerfiles?

Closed this issue · 1 comments

nikos commented

Say you want (read: "have") to increase the version number of microservice-demo-catalog (pom.xml), are you suggesting to also adapt the new version number in Dockerfile respectively, is there a recommendation on how to achieve this most elegantly (using environment variables or such) ?

Good question. The demo does not really cover this aspect. I would argue that the Docker image might be the deployable artifact and should therefore be versioned. However, this is not integrated in the build process i.e. the build would need to cover this, too, using a Maven Plug In for Docker for example.

Or you would need to tweak the build to generate a new version for each run of the build. Then the version number can be passed in as command line parameter.

I would be open for other suggestions.