maven - Dynamically get JAR filename in DockerFile -


i new docker. using spring boot , when build project using maven, create jar file app-.jar , coping jar file using add command in dockerfile. if change version number in pom.xml, need manually update jar file name in dockerfile. there anyway can dynamically version number in pom.xml , update jar file name automatically in dockerfile?

instead of copying jar file inside dockerfile, can mount folder in jar created. , not needed worried filename.

what want can done using environment variables. can create --env-file , keep version number there. , inside dockerfile, refer value of variable declared in env file {versiion}. following process, may want use same version in pom file. that, take @ this question.

the answer links environment variables setting env.path , detailed guide here.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -