-
Hello Team, We are using the spring-boot-maven-plugin to create a build-image and it is using paketobuildpacks/builder:base image we are not able to install tomcat though the spring-boot-starter-tomcat is provided by default by the spring-boot-starter-web. How can we ensure that the cnb paketo-buildpacks/apache-tomcat is installed before the base image is built? Do we have any working samples or documentation available for reference? Do we need to configure the application to enable embedded tomcat or spring boot does all the configuration for us, do we have any sample or documentation available fore reference? We have gone through the spring-boot documentation, but there is no reference related to paketo-buildpacks/apache-tomcat. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Sorry, I'm not sure I understand the problem exactly. Here's what I can share.
Hope that helps! |
Beta Was this translation helpful? Give feedback.
Sorry, I'm not sure I understand the problem exactly. Here's what I can share.
By default, Spring Boot apps are going to produce an executable JAR. That will have an embedded web server. Either Tomcat for Spring MVC apps or Netty for Spring WebFlux apps. Either way, it's got everything included and ready to run. In this case, when you run the Spring Boot Maven build tools plugin to make a container image of your app using Buildpacks, it'll package those files up and run the executable directly. It doesn't need to install Tomcat or any web server because Spring Boot has included all of that.
Here's a sample app of this workflow.
If you change your Spring Boot build configuration to pro…