I have Dockerized some Tomcat applications with the idea to make it faster and easier to start the application and be ready to code within minutes. I have this working just fine, and I am happy about this.
But maybe I am not doing it right, because as I understand it, if you want to actually develop locally against a running container, you need to mount your entire application directory as a volume onto the running docker container. This means as a developer, you still have to clone all the repositories locally, still run any tasks necessary to get dependencies such as npm install for example, and in my case, I need to still locally clone all the other sub projects that my application requires to run, including the WEB-INF folder required by Tomcat in this case.
Here is a sample of my application structure:
my-app (need to clone this locally) | - WEB-INF - pages/home-page-app (need to also clone this in my-app locally) - pages/about-page-app (need to also clone this in my-app locally) - etc....
The benefit I see right now is the base image I am using in the my-app Dockerfile is a Tomcat image, which is configured to work out of the box with this application, which is really nice, because now the user does not need to download, install or configure Tomcat.
But can someone explain what benefit in development I gain from using Docker, if in the Dockerfile I have instructions for example to run npm install for a Node app, I STILL have to also run npm install locally as well. I see the benefit if I am just running the application, or deploying the application, but for local development, why use Docker? Am I doing it wrong?