Currently I have a Java web app that is backed by half-a-dozen-or-so microservices, where each microservice communicates with 1+ backing resources (DBs, 3rd party REST services, CRMs, legacy systems, JMS, etc.). Each one of these components lives on 1+ VMs. Hence the architecture is as follows:
myapp.war
lives on bothmyapp01.example.com
andmyapp02.example.com
- Connects to
dataservice.war
living ondataservice01.example.com
anddataservice02.example.com
, which connects tomysql01.example.com
myapp.war
also connects tocrmservice.war
living oncrmservice01.example.com
, which connects tohttp://some-3rd-part-crm.example.com
- Connects to
Now say I wanted to "Dockerify" my whole app architecture. Would I write 1 Docker image for each type of component (myapp
, dataservice
, mysql
, crmservice
, etc.) or would I write one "monolithic" container containing all apps, services, DBs, message brokers (JMS), etc.?
I'm sure I could do it either way, but the root of my question is this: Are Docker containers intended to house/contain a single app, or are they intended to represent an entire environment, comprised of multiple interconnected apps/services?