title: Docker Base Image with Tomcat+Spring-Boot and config share mechanism
body: <p>I am a docker newbie seeking ideas.</p>
  
  <p>For a usecase where i need to use tomcat as app server and on top of it add custom spring-boot code and make it a container. Should i be doing that using multi-stage docker build mechanism?</p>
  
  <p>Is it ok to have a base tomcat image and then spring boot image on top of it. OR just put spring boot code into tomcat image and use it in container?</p>
  
  <p>Also i have usecase where spring-boot code will have to connect to external DB (outside image) and want to know best way to have connection pool strategy as i want connections be managed centrally.</p>
  
  <p>Two schools of thoughts - 
  First is to use docker volumes as i do not want team to use config parameters/environment variables set every time?
  Second - have connection pool per docker container so total number of connections are divided by container running (this is risky as autoscaling will take place using Kubernetes)</p>