I have an application in java that is deployed inside a docker container, but every time I make a new release I have to manually update the version of the app in the docker file, is there any way to automate this by taking the version directly from the pom?
Here my dockerfile
FROM openjdk:17
COPY target/projectName-x.x.x.jar app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
obviously instead of x.x.x is the correct version number