I’m quite sure that this has been asked before, but I’m going to ask something more specific hopefully.
I’m working on building an Java web hosted solution with a MySQL database and using Apache Tomcat as the Web and Application server. FYI. This is my first time using Docker.
Anyhow, my understanding is that the purpose of using docker is to have one container that encapsulates everything I need to run an application. True/False?
For example, in a traditional VM, I would go by installing an OS, setting up MySQL, installing JDK, installing and setting up Apache Tomcat and what ever else I need. Instead of doing all this within the OS, are we doing this within one container now? This is where I am confused actually.
I have seen that there are containers for Apache, MySQL and etc… OR is it that on my Host OS I’ll be running multiple containers and each container performing 1 specific job function. By this I mean, will I create one container for Apache Tomcat, one for MySQL, one for the application where I will deploy the WAR file and etc… If indeed this is the correct way to go by installing multiple containers per job function then how am I benefiting from Docker. The way I see it is that instead of me installing all this directly inside a single VM, i’m now just creating a container for each one.
I have purchased a CentOS 7 server from a web hosting company. It cam with mysql and apache preinstalled. Do i remove these and put them in their own containers?
I’m hoping I have no confused you guys. At the end of the day, I want to deploy my web hosted solution, access it from the web, connect to the db and give the users their data. I know this is common practice, just trying to wrap my head around it.
I appreciate all the help this community is providing to users like me.
Thank you,
Dockit