Docker - run only one process per container
Docker best practice:
Run only one process per container to make it easier to reuse and scale each of the individual services:
- Scaling - With each service being in a separate container, you can scale one of your web servers horizontally as needed to handle more traffic.
- Reusability - Perhaps you have another service that needs a containerized database. You can simply reuse the same database container without bringing two unnecessary services along with it.
- Logging - Coupling containers makes logging much more complex.
- Portability and Predictability - It's much easier to make security patches or debug an issue when there's less surface area to work with.