Add blank lines around headers

This commit is contained in:
yeasy
2026-03-24 09:27:04 -07:00
parent 857e3b73f6
commit ae8636e96f
112 changed files with 468 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ Podman 支持多种操作系统,安装过程也相对简单。
```bash
$ sudo yum -y install podman
```
#### macOS
macOS 上需要安装 Podman Desktop 或通过 Homebrew 安装
@@ -31,6 +32,7 @@ $ brew install podman
$ podman machine init
$ podman machine start
```
### 17.3.3 基本使用
`podman` 的命令行几乎与 `docker` 完全兼容大多数情况下你只需将 `docker` 替换为 `podman` 即可
@@ -42,16 +44,19 @@ $ podman machine start
$ podman run -d -p 80:80 nginx:alpine
```
#### 列出容器
```bash
$ podman ps
```
#### 构建镜像
```bash
$ podman build -t myimage .
```
### 17.3.4 Pods 的概念
Docker 不同Podman 支持Pod的概念 (类似于 Kubernetes Pod)允许你在同一个网络命名空间中运行多个容器
@@ -65,6 +70,7 @@ $ podman pod create --name mypod -p 8080:80
$ podman run -d --pod mypod --name webbing nginx
```
### 17.3.5 迁移到 Podman
如果你习惯使用 `docker` 命令可以简单地设置别名
@@ -72,6 +78,7 @@ $ podman run -d --pod mypod --name webbing nginx
```bash
$ alias docker=podman
```
#### Systemd 集成
Podman 可以生成 systemd 单元文件让容器像普通系统服务一样管理
@@ -89,6 +96,7 @@ $ podman generate systemd --name myweb --files --new
$ systemctl --user enable --now container-myweb.service
```
#### Podman Compose
虽然 Podman 兼容 Docker Compose但在某些场景下你可能需要明确使用 `podman-compose`