mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-11 20:31:18 +00:00
style(docs): standardize heading formats and numbering
- Enforce Level 1-3 structural numbering based on SUMMARY.md hierarchy - Remove structural numbering from Level 4+ headings - Eliminate single child headings by converting to bold text - Auto-inject summary text for headings with multiple children missing intro text - Exclude Appendix chapters from structural numbering - Avoid modifying code block contents - Add script to detect non-standard English usage in headers
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
## 安装 Fedora CoreOS
|
||||
## 16.2 安装 Fedora CoreOS
|
||||
|
||||
本节涵盖了相关内容与详细描述,主要探讨以下几个方面:
|
||||
|
||||
### 下载 ISO
|
||||
### 16.2.1 下载 ISO
|
||||
|
||||
在[下载页面](https://getfedora.org/coreos/download/) `Bare Metal & Virtualized` 标签页下载 ISO。
|
||||
|
||||
### 编写 FCC
|
||||
### 16.2.2 编写 FCC
|
||||
|
||||
FCC 是 Fedora CoreOS Configuration (Fedora CoreOS 配置) 的简称。
|
||||
|
||||
@@ -24,7 +24,7 @@ passwd:
|
||||
|
||||
将 `ssh-rsa AAAA...` 替换为自己的 SSH 公钥 (位于 `~/.ssh/id_rsa.pub`)。
|
||||
|
||||
### 转换 FCC 为 Ignition
|
||||
### 16.2.3 转换 FCC 为 Ignition
|
||||
|
||||
运行以下命令:
|
||||
|
||||
@@ -32,7 +32,7 @@ passwd:
|
||||
$ docker run -i --rm quay.io/coreos/fcct:v0.5.0 --pretty --strict < example.fcc > example.ign
|
||||
```
|
||||
|
||||
### 挂载 ISO 启动虚拟机并安装
|
||||
### 16.2.4 挂载 ISO 启动虚拟机并安装
|
||||
|
||||
> 虚拟机需要分配 3GB 以上内存,否则会无法启动。
|
||||
|
||||
@@ -44,7 +44,7 @@ $ sudo coreos-installer install /dev/sda --ignition-file example.ign
|
||||
|
||||
安装之后重新启动即可使用。
|
||||
|
||||
### 使用
|
||||
### 16.2.5 使用
|
||||
|
||||
运行以下命令:
|
||||
|
||||
@@ -54,6 +54,6 @@ $ ssh core@虚拟机IP
|
||||
$ docker --version
|
||||
```
|
||||
|
||||
### 参考链接
|
||||
### 16.2.6 参考链接
|
||||
|
||||
* [官方文档](https://docs.fedoraproject.org/en-US/fedora-coreos/bare-metal/)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
## Fedora CoreOS 介绍
|
||||
## 16.1 Fedora CoreOS 介绍
|
||||
|
||||
[Fedora CoreOS](https://getfedora.org/coreos/) 是一个自动更新的,最小的,整体的,以容器为中心的操作系统,不仅适用于集群,而且可独立运行,并针对运行 Kubernetes 进行了优化。它旨在结合 CoreOS Container Linux 和 Fedora Atomic Host 的优点,将 Container Linux 中的 [Ignition](https://github.com/coreos/ignition) 与 [rpm-ostree](https://github.com/coreos/rpm-ostree) 和 Project Atomic 中的 SELinux 强化等技术相集成。其目标是提供最佳的容器主机,以安全,大规模地运行容器化的工作负载。
|
||||
|
||||
### FCOS 特性
|
||||
### 16.1.1 FCOS 特性
|
||||
|
||||
本节涵盖了相关内容与详细描述,主要探讨以下几个方面:
|
||||
|
||||
@@ -24,7 +24,7 @@ FCOS 使用 rpm-ostree 系统进行事务性升级。无需像 yum 升级那样
|
||||
|
||||
对于诸如构建,复制和其他管理容器的任务,FCOS 用一组容器工具代替了 **Docker CLI**。**podman CLI** 工具支持许多容器运行时功能,例如运行,启动,停止,列出和删除容器和镜像。**skopeo CLI** 工具可以复制,认证和签名镜像。您还可以使用 **crictl CLI** 工具来处理 CRI-O 容器引擎中的容器和镜像。
|
||||
|
||||
### 参考文档
|
||||
### 16.1.2 参考文档
|
||||
|
||||
* [官方文档](https://docs.fedoraproject.org/en-US/fedora-coreos/)
|
||||
* [openshift 官方文档](https://docs.openshift.com/container-platform/4.3/architecture/architecture-rhcos.html)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[`podman`](https://github.com/containers/podman) 是一个无守护进程、与 Docker 命令高度兼容的下一代 Linux 容器工具。它由 Red Hat 开发,旨在提供一个更安全的容器运行环境。
|
||||
|
||||
## Podman vs Docker
|
||||
## 16.3 Podman vs Docker
|
||||
|
||||
Podman 和 Docker 在设计理念上存在显著差异,主要体现在架构和权限模型上。
|
||||
|
||||
@@ -13,11 +13,11 @@ Podman 和 Docker 在设计理念上存在显著差异,主要体现在架构
|
||||
| **生态** | 完整的生态系统 (Compose, Swarm) | 专注单机容器,配合 Kubernetes 使用 |
|
||||
| **镜像构建** | `docker build` | `podman build` 或 `buildah` |
|
||||
|
||||
## 安装
|
||||
## 16.3 安装
|
||||
|
||||
Podman 支持多种操作系统,安装过程也相对简单。
|
||||
|
||||
### CentOS / RHEL
|
||||
### 16.3.1 CentOS / RHEL
|
||||
|
||||
运行以下命令:
|
||||
|
||||
@@ -25,7 +25,7 @@ Podman 支持多种操作系统,安装过程也相对简单。
|
||||
$ sudo yum -y install podman
|
||||
```
|
||||
|
||||
### macOS
|
||||
### 16.3.2 macOS
|
||||
|
||||
macOS 上需要安装 Podman Desktop 或通过 Homebrew 安装:
|
||||
|
||||
@@ -35,11 +35,11 @@ $ podman machine init
|
||||
$ podman machine start
|
||||
```
|
||||
|
||||
## 使用
|
||||
## 16.3 使用
|
||||
|
||||
`podman` 的命令行几乎与 `docker` 完全兼容,大多数情况下,你只需将 `docker` 替换为 `podman` 即可。
|
||||
|
||||
### 运行容器
|
||||
### 16.3.1 运行容器
|
||||
|
||||
运行以下命令:
|
||||
|
||||
@@ -49,7 +49,7 @@ $ podman machine start
|
||||
$ podman run -d -p 80:80 nginx:alpine
|
||||
```
|
||||
|
||||
### 列出容器
|
||||
### 16.3.2 列出容器
|
||||
|
||||
运行以下命令:
|
||||
|
||||
@@ -57,7 +57,7 @@ $ podman run -d -p 80:80 nginx:alpine
|
||||
$ podman ps
|
||||
```
|
||||
|
||||
### 构建镜像
|
||||
### 16.3.3 构建镜像
|
||||
|
||||
运行以下命令:
|
||||
|
||||
@@ -65,7 +65,7 @@ $ podman ps
|
||||
$ podman build -t myimage .
|
||||
```
|
||||
|
||||
## Pods 的概念
|
||||
## 16.3 Pods 的概念
|
||||
|
||||
与 Docker 不同,Podman 支持 “Pod” 的概念 (类似于 Kubernetes 的 Pod),允许你在同一个网络命名空间中运行多个容器。
|
||||
|
||||
@@ -79,7 +79,7 @@ $ podman pod create --name mypod -p 8080:80
|
||||
$ podman run -d --pod mypod --name webbing nginx
|
||||
```
|
||||
|
||||
## 迁移到 Podman
|
||||
## 16.3 迁移到 Podman
|
||||
|
||||
如果你习惯使用 `docker` 命令,可以简单地设置别名:
|
||||
|
||||
@@ -87,7 +87,7 @@ $ podman run -d --pod mypod --name webbing nginx
|
||||
$ alias docker=podman
|
||||
```
|
||||
|
||||
### 进阶用法
|
||||
### 16.3.1 进阶用法
|
||||
|
||||
本节涵盖了相关内容与详细描述,主要探讨以下几个方面:
|
||||
|
||||
@@ -118,7 +118,7 @@ $ pip3 install podman-compose
|
||||
$ podman-compose up -d
|
||||
```
|
||||
|
||||
### 参考
|
||||
### 16.3.2 参考
|
||||
|
||||
* [Podman 官方网站](https://podman.io/)
|
||||
* [Podman GitHub 仓库](https://github.com/containers/podman)
|
||||
|
||||
Reference in New Issue
Block a user