Docker springboot app update war file without rebuilding using maven
I am running Docker for Windows
version 1.12.3 and have a spring boot application running in a Docker container.
I’m using a maven container to build my application.
docker run --rm -it -v $(cd)\trunk:/project maven:3.3.9-jdk-8 mvn clean package -f /project
Which works fine it builds my war inside truck, then I run a tomcat container. copy my war file into the container and my application runs on port 8080.
docker run -it -p 8080:8080 -p 8005:8005 -p8009:8009 -v $(cd)\trunk\target\myAPP.war:/usr/local/tomcat/webapps/ROOT.war tomcat:8.0.38-jre8
Now if I make a change (small) in my code (like add a comment, or return hello “just an example”) the only way I can see the change in my application is to run the maven container again (which takes about 5 mins or so) and then run the tomcat container.
Is there a way for me to just update the code (like the way Spring Tool Suite does it) and then run the tomcat container so it picks up the changes in my code?