Why is better to run mutliple docker containers then run one?

docker

(Dejan Milosevic) #1

It seems much more cleaner to me to run one docker container for all dependecies for some app, and to have multiple docker containers to sepparate apps, for example discourse container, wordpress container.

But on many places i have read that that was not good practise, and that is better to separate database container, app container etc.

Can someone explaine me why is so?


(Sam Saffron) #2

In practical terms, main thing you lose out on with a single container is that you have to shut everything down while bootstrapping a new image, that means that if you need to update your container you are looking at a few minutes of outage


(Dejan Milosevic) #3

But do you agree that is cleaner solution?


(Sam Saffron) #4

If you clean the your house with a vacuum or a broom is it cleaner? Everything depends, its a tradeoff.


(Jeff Atwood) #5

I personally think it is much simpler to have everything in a single container. Multiple containers is far more complex.

I would only advise multiple containers for large sites that really need multiple server scalability / redundancy and zero downtime Discourse updates once every month or so.