Hi Docker Community,
Please do take a look at the below content and share your thoughts on the same.
We want to use the Docker setup for the entire scenario, end-to-end, perhaps with Kubernetes as part of it as well.
Given: There is a project source code with the Build file, which generates the jar file, in GitHub/GitLab. When the build file is run, we get a jar file with built-in Tomcat server, which means, when we run the jar file, the Tomcat server will be started and hence our Application instance (1 instance is started).
Need: Can we create multiple instances of this application in a containersized manner, meaning, we should be able to create as many instances as possible in their own separate container. Here when we are creating multiple instances of the application, we should do the build of the project only once, and also, each of the container which host the application need to have their own OS and have the Java and Nginx installed on them.
My Comments: We should be able to do the build of the project (remotely from GitHub or GitLab) and deploy the generated jar file onto the base-OS by running the commands from the base-OS. Then we should be able to create 1 or more containers, perhaps, via Kubernetes. I understand that having dedicated OS with Java and Nginx installed in each of the Containers is redundant, but I wanted to do it as a sample. Ideally, we would install Java and Nginx on the base OS only once, in our case, and then spin as many containers as we want to run corresponding number of instances of the application.