Add more content and fix format

This commit is contained in:
Baohua Yang
2026-02-25 21:06:21 -08:00
parent dd449bc84f
commit ecab788013
119 changed files with 566 additions and 496 deletions

View File

@@ -1,6 +1,6 @@
# 20.2 Busybox
## 20.1 Busybox
### 20.2.1 简介
### 20.1.1 简介
下图直观地展示了本节内容
@@ -11,7 +11,7 @@
`BusyBox` 可运行于多款 `POSIX` 环境的操作系统中 `Linux` (包括 `Android`)`Hurd``FreeBSD`
### 20.2.2 获取官方镜像
### 20.1.2 获取官方镜像
可以使用 `docker pull` 指令下载 `busybox:latest` 镜像
@@ -32,7 +32,7 @@ REPOSITORY TAG IMAGE ID CREATED
busybox latest e72ac664f4f0 6 weeks ago 2.433 MB
```
### 20.2.3 运行 busybox
### 20.1.3 运行 busybox
启动一个 `busybox` 容器并在容器中执行 `grep` 命令
@@ -110,7 +110,7 @@ tmpfs on /sys/firmware type tmpfs (ro,relatime)
`busybox` 镜像虽然小巧但包括了大量常见的 `Linux` 命令读者可以用它快速熟悉 `Linux` 命令
### 20.2.4 相关资源
### 20.1.4 相关资源
* `Busybox` 官网https://busybox.net/
* `Busybox` 官方仓库https://git.busybox.net/busybox/

View File

@@ -1,6 +1,6 @@
# 20.3 Alpine
## 20.2 Alpine
### 20.3.1 简介
### 20.2.1 简介
下图直观地展示了本节内容
@@ -26,7 +26,7 @@ ubuntu latest b39b81afc8ca 188.3 MB
centos latest 8efe422e6104 210 MB
```
### 20.3.2 获取并使用官方镜像
### 20.2.2 获取并使用官方镜像
由于镜像很小下载时间往往很短读者可以直接使用 `docker run` 指令直接运行一个 `Alpine` 容器并指定运行的 Linux 指令例如
@@ -35,7 +35,7 @@ $ docker run alpine echo '123'
123
```
### 20.3.3 迁移至 Alpine 基础镜像
### 20.2.3 迁移至 Alpine 基础镜像
目前大部分 Docker 官方镜像都已经支持 `Alpine` 作为基础镜像可以很容易进行迁移
@@ -65,7 +65,7 @@ RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g" /etc/apk/repositories
&& apk add --no-cache <package>
```
### 20.3.4 相关资源
### 20.2.4 相关资源
* `Alpine` 官网https://www.alpinelinux.org/
* `Alpine` 官方仓库https://github.com/alpinelinux

View File

@@ -1,8 +1,8 @@
# 20.4 Debian Ubuntu
## 20.3 Debian Ubuntu
`Debian` `Ubuntu` 都是目前较为流行的 **Debian ** 的服务器操作系统十分适合研发场景`Docker Hub` 上提供了官方镜像国内各大容器云服务也基本都提供了相应的支持
### 20.4.1 Debian 系统简介
### 20.3.1 Debian 系统简介
下图直观地展示了本节内容
@@ -30,7 +30,7 @@ Debian GNU/Linux 8
`Debian` 镜像很适合作为基础镜像构建自定义镜像
### 20.4.2 Ubuntu 系统简介
### 20.3.2 Ubuntu 系统简介
下图直观地展示了本节内容
@@ -135,7 +135,7 @@ root@7d93de07bf76:/# curl 127.0.0.1
配合使用 `-p` 参数对外映射服务端口可以允许容器外来访问该服务
### 20.4.3 相关资源
### 20.3.3 相关资源
* `Debian` 官网https://www.debian.org/
* `Neuro Debian` 官网http://neuro.debian.net/

View File

@@ -1,6 +1,6 @@
# 20.5 CentOS Fedora
## 20.4 CentOS Fedora
### 20.5.1 CentOS 系统简介
### 20.4.1 CentOS 系统简介
`CentOS` `Fedora` 都是基于 `Redhat` 的常见 Linux 分支`CentOS` 是目前企业级服务器的常用操作系统`Fedora` 则主要面向个人桌面用户
@@ -29,7 +29,7 @@ Status: Downloaded newer image for centos:7
CentOS Linux release 7.9.2009 (Core)
```
### 20.5.2 Fedora 系统简介
### 20.4.2 Fedora 系统简介
下图直观地展示了本节内容
@@ -54,7 +54,7 @@ Fedora release 39 (Thirty Nine)
```
### 20.5.3 相关资源
### 20.4.3 相关资源
* `Fedora` 官网https://getfedora.org/
* `Fedora` 官方仓库https://github.com/fedora-infra

View File

@@ -1,4 +1,4 @@
# 20.6 本章小结
## 本章小结
本章讲解了典型操作系统镜像的下载和使用