It appears that Docker is better suited for single process applications and services, but is it capable to offer a stable containment for a more complex application ( that has multiple processes, listening ports, considerable storage usage ) ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Yes! You can use Supervisor, monit, runit, or even a "real" init system (including upstart or systemd) to run multiple processes. You can even use a cheap shell script like the following:
#!/bin/sh
( while true; do run-process-1; done; ) &
( while true; do run-process-2; done; ) &
wait
回答2:
Note that I have a supervisor image and some examples on github. In case someone thinks it usefull: I also wrote a blog on this.
I mainly use supervisor to keep deamon processes running, but you could create complex environments as well (e.g. specify the order to start processes etc.).
回答3:
Sure checkout http://supervisord.org/ i am creating complete LAMP stacks for Magento development.