即使对于码头工人环境,Supervisord也是非常棒的工具。它对stderr重定向和信号转发有很大帮助。但它有几个缺点:
docker ps -a
那么对于supervisord来说,最好的替代方案是什么?
答案 0 :(得分:4)
响应" PID1僵尸收获"问题,我之前建议(在" Use of Supervisor in docker")中使用runit instead of supervisord
Runit使用的内存少于Supervisord,因为Runit是用C编写的,而Supervisord是用Python编写的 在某些用例中,容器中的进程重新启动优于整个容器重新启动。
有关详情,请参阅phusion/baseimage-docker
图片。
正如Torsten Bronger中的the comments所述:
Runit不能解决收割问题 相反,它支持多个流程。鼓励多个进程用于安全性(通过进程和用户隔离)。
自2015年起,您现在可以Specify an init process that should be used as the PID 1 in the containe, with docker run --init
使用的默认
.viewer { text-align: left; display: flex; /* changed the display to flex */ width: 90%; height: 90%; position: relative; background-color: green; padding: 1em; min-height: 35.45em; } .leftpanel { width: 15em; /*Alter depending on how much space this takes*/ float: left; height: 100%; position: relative; background-color: yellow; align-items: stretch; /* Added the align-items property */ }
进程是Docker守护程序进程的系统路径中找到的第一个init
可执行文件。
默认安装中包含的此docker-init
二进制文件由tini
支持。
答案 1 :(得分:3)
任何新访客:
如果您是容器化的初学者,强烈建议对每个容器使用一个过程,这样会使每个人的生活变得轻松。
没有任何黑客手段,所有其他工具都将完美运行,同时也将改善可观察性。
不要像虚拟机那样对待容器。