Auto-sync: 2026-04-19 16:02
This commit is contained in:
25
wiki/concepts/Init-System.md
Normal file
25
wiki/concepts/Init-System.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
title: "Init System"
|
||||
type: concept
|
||||
tags: [Container, Security, Process]
|
||||
last_updated: 2026-04-19
|
||||
---
|
||||
|
||||
## 定义
|
||||
Init 系统是容器内的初始化进程,用于处理系统信号和回收僵尸进程。常见实现包括 teeny、tini 等。
|
||||
|
||||
## 为什么需要 Init 系统
|
||||
容器默认只运行一个进程(PID 1),当该进程退出时容器终止。但以下情况需要 init 系统:
|
||||
- 处理孤儿僵尸进程
|
||||
- 正确传播 SIGTERM 信号
|
||||
- 清理退出的子进程
|
||||
- 避免资源耗尽
|
||||
|
||||
## 工具示例
|
||||
- teeny:轻量级 init 系统
|
||||
- tini:Docker 官方推荐
|
||||
- dumb-init:简单易用
|
||||
|
||||
## 相关资源
|
||||
- 来源:[[CTP Topic 49 Container Lifecycle Hardening Standards]]
|
||||
- 相关概念:[[Container-Lifecycle-Hardening]]
|
||||
Reference in New Issue
Block a user