Springboot 2.3 with Docker. I want to build image for a specific app when I have multiple springboot applications in same repository
Building on a stack of other answers, you can use the advanced reactor options to target a single module in the reactor and build the image just for that module.
A command like
mvn -pl <module-name> -am spring-boot:build-image
will likely give you what you're looking for.
Whichever platform you're using, you should be able to point the build toward your relevant subdirectory. For instance, if you're using pack
, you can use pack build -p <repo dir>/<app A dir>
. Depending on which Java buildpack you're using, it should run Maven for you and set up the resulting JAR to launch when the app image is started.