user2732949
user2732949

Reputation: 1223

Why shouldn't I run multiple processes in a Docker container?

I've been told you should only run a single process within a container. Why can't I run more than one? It looks like I can use supervisord to do this.

Upvotes: 2

Views: 1355

Answers (3)

Kevin
Kevin

Reputation: 1569

You can use Supervisord or Honcho to build multiple processes container.

Upvotes: 1

Andreas Steffan
Andreas Steffan

Reputation: 6159

Personally, I don't think processes generally map well to separation of concerns in a one-to-one fashion.

In fact, I think the best reasoning for recommending running only one process per container today is technical and boils down to process management and logging issues for the most part. These aspects tend to get messy and complicated when you have more than on process in a container.

Upvotes: 2

Vishnu Atrai
Vishnu Atrai

Reputation: 2368

Because of separation of concerns pattern. It will be easy to upgrade or modify separate containers running separate processes.

Upvotes: 1

Related Questions