Docker Container Best Practices
I’m trying to figure out how to use docker in the best possible way to keep my new server environment efficient and organized. However I struggle a little bit with what can be containerized separately. I want to have an instance of
and possibly some more stuff. A separate database container is for sure useful, as well as data volumes/data volume containers.
But how about eg a shared webserver for both these services? Is this possible/recommended? What is the recommended granularity of such a setup?
2 Solutions collect form web for “Docker Container Best Practices”
The generally accepted practice is “one process per container”.
You could run a single web server container for both services if you wanted to. If you started to feel like the responsibilities of each vhost were diverging, then you could split it into two.
Have a look at this, might be helpful: http://blog.bigstep.com/big-data-performance/docker-best-practices/