擅长:python、mysql、java
<p>主管要求其管理的进程不按其<a href="http://supervisord.org/subprocess.html#nondaemonizing-of-subprocesses">documentation</a>进行后台监控:</p>
<blockquote>
<p>Programs meant to be run under supervisor should not daemonize
themselves. Instead, they should run in the foreground. They should
not detach from the terminal from which they are started.</p>
</blockquote>
<p>这在很大程度上与Docker不兼容,容器是Docker进程本身的子进程(即,因此不是Supervisor的子进程)。</p>
<p>为了能够将Docker与Supervisor一起使用,可以编写与Docker一起工作的<a href="http://supervisord.org/subprocess.html#pidproxy-program">^{<cd1>} program</a>等价的代码。</p>
<hr/>
<p>但实际上,这两个工具并不是真正的协同工作架构,因此您应该考虑更改其中一个:</p>
<ul>
<li>考虑用<a href="https://github.com/docker/compose/">Docker Compose</a>(设计用于Docker)替换主管</li>
<li>考虑用<a href="https://github.com/coreos/rkt">Rocket</a>(没有“主”进程)替换Docker</li>
</ul>