Files
nexus/wiki/concepts/Init-System.md
2026-04-19 16:02:56 +08:00

25 lines
744 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Init System"
type: concept
tags: [Container, Security, Process]
last_updated: 2026-04-19
---
## 定义
Init 系统是容器内的初始化进程,用于处理系统信号和回收僵尸进程。常见实现包括 teeny、tini 等。
## 为什么需要 Init 系统
容器默认只运行一个进程PID 1当该进程退出时容器终止。但以下情况需要 init 系统:
- 处理孤儿僵尸进程
- 正确传播 SIGTERM 信号
- 清理退出的子进程
- 避免资源耗尽
## 工具示例
- teeny轻量级 init 系统
- tiniDocker 官方推荐
- dumb-init简单易用
## 相关资源
- 来源:[[CTP Topic 49 Container Lifecycle Hardening Standards]]
- 相关概念:[[Container-Lifecycle-Hardening]]