Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@
/05_container/* @yeasy @khs1994
/06_repository/* @khs1994
/07_dockerfile/* @yeasy @khs1994
/08_data_network/* @yeasy @khs1994
/09_buildx/* @khs1994
/10_compose/* @yeasy @khs1994
/11_ops/* @yeasy @khs1994
/12_orchestration/* @yeasy @khs1994
/13_ecosystem/* @khs1994
/14_implementation/* @yeasy @khs1994
/15_cases/* @yeasy @khs1994
/16_appendix/* @yeasy @khs1994
/08_data/* @yeasy @khs1994
/09_network/* @yeasy @khs1994
/10_buildx/* @khs1994
/11_compose/* @yeasy @khs1994
/12_implementation/* @yeasy @khs1994
/13_kubernetes_concepts/* @yeasy @khs1994
/14_kubernetes_setup/* @yeasy @khs1994
/15_etcd/* @yeasy @khs1994
/16_cloud/* @khs1994
/17_ecosystem/* @khs1994
/18_security/* @yeasy @khs1994
/19_observability/* @yeasy @khs1994
/20_cases_os/* @yeasy @khs1994
/21_case_devops/* @yeasy @khs1994
/appendix/* @yeasy @khs1994
/.drone.yml @khs1994
/.editorconfig/ @khs1994
/.gitattributes @khs1994
Expand Down
5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,4 @@ about: Create a report to help us improve
<!--describe problem with detailed steps and logs-->







<!--提交问题之前请点击预览标签,符合要求之后再提交问题-->
5 changes: 0 additions & 5 deletions .github/ISSUE_TEMPLATE/Custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,4 @@ about: Create a issue about Docker
<!--describe problem with detailed steps and logs-->







<!--提交问题之前请点击预览标签,符合要求之后再提交问题-->
20 changes: 5 additions & 15 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,15 @@ jobs:

cp -r _images .vuepress/dist
mkdir -p .vuepress/dist/appendix
cp -r 16_appendix/_images .vuepress/dist/appendix
mkdir -p .vuepress/dist/cases/ci/drone
cp -r 15_cases/ci/drone/_images .vuepress/dist/cases/ci/drone
mkdir -p .vuepress/dist/cases/os
cp -r 15_cases/os/_images .vuepress/dist/cases/os
cp -r appendix/_images .vuepress/dist/appendix
mkdir -p .vuepress/dist/cloud
cp -r 13_ecosystem/cloud/_images .vuepress/dist/cloud
cp -r 16_cloud/_images .vuepress/dist/cloud
mkdir -p .vuepress/dist/data_management
cp -r 08_data_network/data/_images .vuepress/dist/data_management
cp -r 08_data/_images .vuepress/dist/data_management
mkdir -p .vuepress/dist/etcd
cp -r 12_orchestration/etcd/_images .vuepress/dist/etcd
mkdir -p .vuepress/dist/image
cp -r 04_image/_images .vuepress/dist/image
mkdir -p .vuepress/dist/install
cp -r 03_install/_images .vuepress/dist/install
cp -r 15_etcd/_images .vuepress/dist/etcd
mkdir -p .vuepress/dist/kubernetes
cp -r 12_orchestration/kubernetes/_images .vuepress/dist/kubernetes
mkdir -p .vuepress/dist/underly
cp -r 14_implementation/_images .vuepress/dist/underly
cp -r 13_kubernetes_concepts/_images .vuepress/dist/kubernetes

echo "include: [_images]" > .vuepress/dist/_config.yml
- name: Upload Vuepress dist
Expand Down
6 changes: 0 additions & 6 deletions 01_introduction/1.2_what.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ flowchart LR

#### 关键区别

相关信息如下表:

| 特性 | Docker 容器 | 传统虚拟机 |
|------|-------------|------------|
| **启动速度** | 秒级 | 分钟级 |
Expand All @@ -82,10 +80,6 @@ Docker 使用 [Go 语言](https://golang.google.cn/)开发,基于 Linux 内核

> 如果你对这些底层技术感兴趣,可以阅读本书的[底层实现](../12_implementation/README.md)章节。

#### 概述

总体概述了以下内容。

#### Docker 架构演进

Docker 的底层实现经历了多次演进:
Expand Down
14 changes: 1 addition & 13 deletions 01_introduction/1.3_why.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

#### 场景一:“在我电脑上明明能跑”

具体内容如下:

```bash
周五下午 5:00
├── 开发者:代码写完了,本地测试通过,提交!🎉
Expand All @@ -28,8 +26,6 @@

#### 场景二:环境配置的噩梦

具体内容如下:

```bash
新同事入职
├── Day 1:领电脑,配环境
Expand All @@ -41,8 +37,6 @@

#### 场景三:服务器迁移的恐惧

具体内容如下:

```bash
运维:"我们需要把服务迁移到新服务器"
开发:"旧服务器上的配置文档在哪?"
Expand All @@ -54,14 +48,8 @@

Docker 的出现为上述问题提供了完美的解决方案。它通过 “一次构建,到处运行” 的核心理念,从根本上改变了软件交付的方式。

#### 概述

总体概述了以下内容。

#### 核心理念:一次构建,到处运行

具体内容如下:

```mermaid
flowchart LR
dev["开发团队"] -->|创建| img["Docker 镜像"]
Expand Down Expand Up @@ -158,7 +146,7 @@ flowchart LR

- 构建过程 **可重复、可追溯**
- 任何人都能从代码重建完全相同的镜像
- 配合 [GitHub Actions](../20_cases/ci/actions/README.md) 等 CI 系统实现自动化
- 配合 [GitHub Actions](../21_case_devops/21.2_github_actions.md) 等 CI 系统实现自动化

#### 5. 轻松迁移

Expand Down
6 changes: 3 additions & 3 deletions 02_basic_concept/2.1_image.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ Docker 镜像是一个特殊的文件系统,包含:
| **库文件** | libc、OpenSSL、各种依赖库 |
| **配置文件** | nginx.conf、my.cnf 等 |
| **环境变量** | PATH、LANG 等预设值 |
| **元数据**| 启动命令、暴露端口、数据卷定义 |**关键特性**:
| **元数据** | 启动命令、暴露端口、数据卷定义 |

**关键特性**:
- ✅ 镜像是 **只读** 的
- ✅ 镜像 **不包含** 动态数据
- ✅ 镜像构建后 **内容不会改变**
Expand Down Expand Up @@ -140,8 +142,6 @@ RUN apt-get update && \

#### 查看镜像的分层

运行以下命令:

```bash
## 查看镜像的历史(每层的构建记录)

Expand Down
8 changes: 1 addition & 7 deletions 02_basic_concept/2.2_container.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

### 2.2.2 容器的本质

> 💡 **笔者认为,理解这一点是理解 Docker 的关键****容器的本质是一个特殊的进程。**
> 💡 **笔者认为,理解这一点是理解 Docker 的关键:** **容器的本质是一个特殊的进程。**

```mermaid
flowchart TD
Expand Down Expand Up @@ -166,14 +166,8 @@ stateDiagram-v2

图 2-1 容器生命周期状态流转图

#### 概述

总体概述了以下内容。

#### 常用生命周期命令

运行以下命令:

```bash
## 创建并启动容器(最常用)

Expand Down
4 changes: 0 additions & 4 deletions 02_basic_concept/2.3_repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ $ docker pull localhost:5000/myapp:v1.0

#### 常用命令

运行以下命令:

```bash
## 登录 Registry

Expand Down Expand Up @@ -279,8 +277,6 @@ $ cosign verify --key cosign.pub $IMAGE

#### 漏洞扫描

运行以下命令:

```bash
## 使用 Docker Scout 扫描镜像漏洞

Expand Down
2 changes: 1 addition & 1 deletion 02_basic_concept/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 第二章基本概念
# 第二章 基本概念

**Docker** 包括三个基本概念:

Expand Down
2 changes: 0 additions & 2 deletions 02_basic_concept/summary.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
## 2.4 本章小结

相关信息如下表:

| 概念 | 要点 |
|------|------|
| **镜像是什么** | 只读的应用模板,包含运行所需的一切 |
Expand Down
8 changes: 0 additions & 8 deletions 03_install/3.1_ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ $ echo \

>以上命令会添加稳定版本的 Docker APT 镜像源,如果需要测试版本的 Docker 请将 stable 改为 test。

#### 概述

总体概述了以下内容。

#### 安装 Docker

更新 apt 软件包缓存,并安装 `docker-ce`:
Expand Down Expand Up @@ -119,8 +115,6 @@ $ sudo sh get-docker.sh --mirror Aliyun

### 3.1.4 启动 Docker

运行以下命令:

```bash
$ sudo systemctl enable docker
$ sudo systemctl start docker
Expand All @@ -146,8 +140,6 @@ $ sudo usermod -aG docker $USER

### 3.1.6 测试 Docker 是否安装正确

运行以下命令:

```bash
$ docker run --rm hello-world

Expand Down
8 changes: 0 additions & 8 deletions 03_install/3.2_debian.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ $ echo \

>以上命令会添加稳定版本的 Docker APT 源,如果需要测试版本的 Docker 请将 stable 改为 test。Debian11 可能不使用 `/etc/apt/keyrings/`,如 gpg 错误可以考虑更换为 `/etc/apt/trusted.gpg.d`,见 [issue 15727](https://github.com/docker/docs/issues/15727)。

#### 概述

总体概述了以下内容。

#### 安装 Docker

更新 apt 软件包缓存,并安装 `docker-ce`。
Expand Down Expand Up @@ -110,8 +106,6 @@ $ sudo sh get-docker.sh --mirror Aliyun

### 3.2.4 启动 Docker

运行以下命令:

```bash
$ sudo systemctl enable docker
$ sudo systemctl start docker
Expand All @@ -137,8 +131,6 @@ $ sudo usermod -aG docker $USER

### 3.2.6 测试 Docker 是否安装正确

运行以下命令:

```bash
$ docker run --rm hello-world

Expand Down
8 changes: 0 additions & 8 deletions 03_install/3.3_fedora.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ $ sudo dnf config-manager --set-enabled docker-ce-test
$ sudo dnf config-manager --set-disabled docker-ce-test
```

#### 概述

总体概述了以下内容。

#### 安装 Docker

更新 `dnf` 软件源缓存,并安装 `docker-ce`。
Expand Down Expand Up @@ -118,8 +114,6 @@ $ sudo sh get-docker.sh --mirror Aliyun

### 3.3.4 启动 Docker

运行以下命令:

```bash
$ sudo systemctl enable docker
$ sudo systemctl start docker
Expand All @@ -145,8 +139,6 @@ $ sudo usermod -aG docker $USER

### 3.3.6 测试 Docker 是否安装正确

运行以下命令:

```bash
$ docker run --rm hello-world

Expand Down
8 changes: 0 additions & 8 deletions 03_install/3.4_centos.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ $ sudo sed -i 's/download.docker.com/mirrors.aliyun.com\/docker-ce/g' /etc/yum.r
$ sudo dnf config-manager --set-enabled docker-ce-test
```

#### 概述

总体概述了以下内容。

#### 安装 Docker

更新 `dnf` 软件源缓存,并安装 `docker-ce`。
Expand Down Expand Up @@ -123,8 +119,6 @@ $ sudo sh get-docker.sh --mirror Aliyun

### 3.4.5 启动 Docker

运行以下命令:

```bash
$ sudo systemctl enable docker
$ sudo systemctl start docker
Expand All @@ -150,8 +144,6 @@ $ sudo usermod -aG docker $USER

### 3.4.7 测试 Docker 是否安装正确

运行以下命令:

```bash
$ docker run --rm hello-world

Expand Down
4 changes: 0 additions & 4 deletions 03_install/3.5_raspberry-pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ $ sudo sh get-docker.sh --mirror Aliyun

### 3.5.4 启动 Docker

运行以下命令:

```bash
$ sudo systemctl enable docker
$ sudo systemctl start docker
Expand All @@ -160,8 +158,6 @@ $ sudo usermod -aG docker $USER

### 3.5.6 测试 Docker 是否安装正确

运行以下命令:

```bash
$ docker run --rm hello-world

Expand Down
Loading