Reputation: 4868
I plan to build a docker environment running several business applications. Each application need a separate database. My question is:
Is it recommended to start a separate database container (e.g. mysql or postgres) for each application container? Or should I run only one database container and install several databases in it?
Is a docker-host with multiple mysql containers - each with one database - wasting CPU or memory?
Upvotes: 2
Views: 948
Reputation: 3662
I would suggest using a separate container for each database, even in development. Using docker-compose
this becomes relatively trivial
Upvotes: 0
Reputation: 10185
Docker way is using separate and independent environment for each service. if you will use separate database for each application you can
But in development environment you can use single container for all databases.
Upvotes: 2