Skip to content

Commit 5cb92f6

Browse files
committed
Update title style
Signed-off-by: Kang HuaiShuai <[email protected]>
1 parent 99e470e commit 5cb92f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+224
-232
lines changed

.vuepress/config.js

+8-15
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,11 @@ module.exports = {
312312
'opensource/linuxkit',
313313
],
314314
},
315+
'appendix/faq/',
315316
{
316-
title: "附录",
317-
collapsable:false,
317+
title: "热门镜像介绍",
318+
collapsable: false,
318319
children: [
319-
'appendix/',
320-
'appendix/faq/',
321320
'appendix/repo/',
322321
'appendix/repo/ubuntu',
323322
'appendix/repo/centos',
@@ -328,19 +327,13 @@ module.exports = {
328327
'appendix/repo/wordpress',
329328
'appendix/repo/mongodb',
330329
'appendix/repo/redis',
331-
'appendix/command/',
332-
'appendix/best_practices',
333-
'appendix/debug',
334-
'appendix/resources'
335-
],
336-
},
337-
{
338-
title: "归档",
339-
collapsable: false,
340-
children: [
341-
'archive/',
342330
],
343331
},
332+
'appendix/command/',
333+
'appendix/best_practices',
334+
'appendix/debug',
335+
'appendix/resources',
336+
'archive/',
344337
{
345338
title: "Docker Machine",
346339
collapsable: false,

advanced_network/access_control.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
## 容器访问控制
1+
# 容器访问控制
22
容器的访问控制,主要通过 Linux 上的 `iptables` 防火墙来进行管理和实现。`iptables` 是 Linux 上默认的防火墙软件,在大部分发行版中都自带。
33

4-
### 容器访问外部网络
4+
## 容器访问外部网络
55
容器要想访问外部网络,需要本地系统的转发支持。在Linux 系统中,检查转发是否打开。
66

77
```bash
@@ -14,17 +14,17 @@ $sysctl -w net.ipv4.ip_forward=1
1414
```
1515
如果在启动 Docker 服务的时候设定 `--ip-forward=true`, Docker 就会自动设定系统的 `ip_forward` 参数为 1。
1616

17-
### 容器之间访问
17+
## 容器之间访问
1818
容器之间相互访问,需要两方面的支持。
1919
* 容器的网络拓扑是否已经互联。默认情况下,所有容器都会被连接到 `docker0` 网桥上。
2020
* 本地系统的防火墙软件 -- `iptables` 是否允许通过。
2121

22-
#### 访问所有端口
22+
### 访问所有端口
2323
当启动 Docker 服务(即 dockerd)的时候,默认会添加一条转发策略到本地主机 iptables 的 FORWARD 链上。策略为通过(`ACCEPT`)还是禁止(`DROP`)取决于配置`--icc=true`(缺省值)还是 `--icc=false`。当然,如果手动指定 `--iptables=false` 则不会添加 `iptables` 规则。
2424

2525
可见,默认情况下,不同容器之间是允许网络互通的。如果为了安全考虑,可以在 `/etc/docker/daemon.json` 文件中配置 `{"icc": false}` 来禁止它。
2626

27-
#### 访问指定端口
27+
### 访问指定端口
2828
在通过 `-icc=false` 关闭网络访问后,还可以通过 `--link=CONTAINER_NAME:ALIAS` 选项来访问容器的开放端口。
2929

3030
例如,在启动 Docker 服务时,可以同时使用 `icc=false --iptables=true` 参数来关闭允许相互的网络访问,并让 Docker 可以修改系统中的 `iptables` 规则。

advanced_network/bridge.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 自定义网桥
1+
# 自定义网桥
22

33
除了默认的 `docker0` 网桥,用户也可以指定网桥来连接各个容器。
44

advanced_network/config_file.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 编辑网络配置文件
1+
# 编辑网络配置文件
22

33
Docker 1.2.0 开始支持在运行中的容器里编辑 `/etc/hosts`, `/etc/hostname``/etc/resolv.conf` 文件。
44

advanced_network/docker0.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 配置 docker0 网桥
1+
# 配置 docker0 网桥
22

33
Docker 服务默认会创建一个 `docker0` 网桥(其上有一个 `docker0` 内部接口),它在内核层连通了其他的物理或虚拟网卡,这就将所有容器和本地主机都放到同一个物理网络。
44

advanced_network/example.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## 工具和示例
1+
# 工具和示例
22
在介绍自定义网络拓扑之前,你可能会对一些外部工具和例子感兴趣:
33

4-
### pipework
4+
## pipework
55
Jérôme Petazzoni 编写了一个叫 [pipework](https://github.com/jpetazzo/pipework) 的 shell 脚本,可以帮助用户在比较复杂的场景中完成容器的连接。
66

7-
### playground
7+
## playground
88
Brandon Rhodes 创建了一个提供完整的 Docker 容器网络拓扑管理的 [Python库](https://github.com/brandon-rhodes/fopnp/tree/m/playground),包括路由、NAT 防火墙;以及一些提供 `HTTP` `SMTP` `POP` `IMAP` `Telnet` `SSH` `FTP` 的服务器。

advanced_network/port_mapping.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
## 映射容器端口到宿主主机的实现
1+
# 映射容器端口到宿主主机的实现
22

33
默认情况下,容器可以主动访问到外部网络的连接,但是外部网络无法访问到容器。
44

5-
### 容器访问外部实现
5+
## 容器访问外部实现
66

77
容器所有到外部网络的连接,源地址都会被 NAT 成本地系统的 IP 地址。这是使用 `iptables` 的源地址伪装操作实现的。
88

@@ -19,7 +19,7 @@ MASQUERADE all -- 172.17.0.0/16 !172.17.0.0/16
1919

2020
其中,上述规则将所有源地址在 `172.17.0.0/16` 网段,目标地址为其他网段(外部网络)的流量动态伪装为从系统网卡发出。MASQUERADE 跟传统 SNAT 的好处是它能动态从网卡获取地址。
2121

22-
### 外部访问容器实现
22+
## 外部访问容器实现
2323

2424
容器允许外部访问,可以在 `docker run` 时候通过 `-p``-P` 参数来启用。
2525

advanced_network/ptp.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 示例:创建一个点到点连接
1+
# 示例:创建一个点到点连接
22
默认情况下,Docker 会将所有容器连接到由 `docker0` 提供的虚拟子网中。
33

44
用户有时候需要两个容器之间可以直连通信,而不用通过主机网桥进行桥接。

advanced_network/quick_guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 快速配置指南
1+
# 快速配置指南
22

33
下面是一个跟 Docker 网络相关的命令列表。
44

appendix/repo/centos.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
## [CentOS](https://hub.docker.com/_/centos)
1+
# [CentOS](https://hub.docker.com/_/centos)
22

3-
### 基本信息
3+
## 基本信息
44

55
[CentOS](https://en.wikipedia.org/wiki/CentOS) 是流行的 Linux 发行版,其软件包大多跟 RedHat 系列保持一致。
66

77
该仓库位于 `https://hub.docker.com/_/centos` ,提供了 CentOS 从 5 ~ 8 各个版本的镜像。
88

9-
### 使用方法
9+
## 使用方法
1010

1111
默认会启动一个最小化的 CentOS 环境。
1212

@@ -15,6 +15,6 @@ $ docker run --name centos -it centos bash
1515
bash-4.2#
1616
```
1717

18-
### Dockerfile
18+
## Dockerfile
1919

2020
请到 https://github.com/docker-library/docs/tree/master/centos 查看。

appendix/repo/mongodb.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
## [MongoDB](https://hub.docker.com/_/mongo/)
1+
# [MongoDB](https://hub.docker.com/_/mongo/)
22

3-
### 基本信息
3+
## 基本信息
44

55
[MongoDB](https://en.wikipedia.org/wiki/MongoDB) 是开源的 NoSQL 数据库实现。
66

77
该仓库位于 `https://hub.docker.com/_/mongo/` ,提供了 MongoDB 2.x ~ 4.x 各个版本的镜像。
88

9-
### 使用方法
9+
## 使用方法
1010

1111
默认会在 `27017` 端口启动数据库。
1212

@@ -29,6 +29,6 @@ $ docker run -it --rm \
2929
sh -c 'exec mongo "$MONGO_PORT_27017_TCP_ADDR:$MONGO_PORT_27017_TCP_PORT/test"'
3030
```
3131

32-
### Dockerfile
32+
## Dockerfile
3333

3434
请到 https://github.com/docker-library/docs/tree/master/mongo 查看。

appendix/repo/mysql.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
## [MySQL](https://hub.docker.com/_/mysql/)
1+
# [MySQL](https://hub.docker.com/_/mysql/)
22

3-
### 基本信息
3+
## 基本信息
44

55
[MySQL](https://en.wikipedia.org/wiki/MySQL) 是开源的关系数据库实现。
66

77
该仓库位于 `https://hub.docker.com/_/mysql/` ,提供了 MySQL 5.5 ~ 8.x 各个版本的镜像。
88

9-
### 使用方法
9+
## 使用方法
1010

1111
默认会在 `3306` 端口启动数据库。
1212

@@ -29,6 +29,6 @@ $ docker run -it --rm \
2929
sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
3030
```
3131

32-
### Dockerfile
32+
## Dockerfile
3333

3434
请到 https://github.com/docker-library/docs/tree/master/mysql 查看

appendix/repo/nginx.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
## [Nginx](https://hub.docker.com/_/nginx/)
1+
# [Nginx](https://hub.docker.com/_/nginx/)
22

3-
### 基本信息
3+
## 基本信息
44

55
[Nginx](https://en.wikipedia.org/wiki/Nginx) 是开源的高效的 Web 服务器实现,支持 HTTP、HTTPS、SMTP、POP3、IMAP 等协议。
66

77
该仓库位于 `https://hub.docker.com/_/nginx/` ,提供了 Nginx 1.0 ~ 1.17.x 各个版本的镜像。
88

9-
### 使用方法
9+
## 使用方法
1010

1111
下面的命令将作为一个静态页面服务器启动。
1212

@@ -43,6 +43,6 @@ $ docker run -d \
4343
nginx
4444
```
4545

46-
### Dockerfile
46+
## Dockerfile
4747

4848
请到 https://github.com/docker-library/docs/tree/master/nginx 查看。

appendix/repo/nodejs.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
## [Node.js](https://hub.docker.com/_/node/)
1+
# [Node.js](https://hub.docker.com/_/node/)
22

3-
### 基本信息
3+
## 基本信息
44

55
[Node.js](https://en.wikipedia.org/wiki/Node.js) 是基于 JavaScript 的可扩展服务端和网络软件开发平台。
66

77
该仓库位于 `https://hub.docker.com/_/node/` ,提供了 Node.js 0.10 ~ 12.x 各个版本的镜像。
88

9-
### 使用方法
9+
## 使用方法
1010

1111
在项目中创建一个 Dockerfile。
1212

@@ -35,6 +35,6 @@ $ docker run -it --rm \
3535
node your-daemon-or-script.js
3636
```
3737

38-
### Dockerfile
38+
## Dockerfile
3939

4040
请到 https://github.com/docker-library/docs/tree/master/node 查看。

appendix/repo/php.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
## [PHP](https://hub.docker.com/_/php/)
1+
# [PHP](https://hub.docker.com/_/php/)
22

3-
### 基本信息
3+
## 基本信息
44

55
[PHP](https://en.wikipedia.org/wiki/php)(Hypertext Preprocessor 超文本预处理器的字母缩写)是一种被广泛应用的开放源代码的多用途脚本语言,它可嵌入到 HTML 中,尤其适合 web 开发。
66

77
该仓库位于 `https://hub.docker.com/_/php/` ,提供了 PHP 5.x ~ 7.x 各个版本的镜像。
88

9-
### 使用方法
9+
## 使用方法
1010

1111
下面的命令将运行一个已有的 PHP 脚本。
1212

1313
```bash
1414
$ docker run -it --rm -v "$PWD":/app -w /app php:alpine php your-script.php
1515
```
1616

17-
### Dockerfile
17+
## Dockerfile
1818

1919
请到 https://github.com/docker-library/docs/tree/master/php 查看。

appendix/repo/redis.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
## [Redis](https://hub.docker.com/_/redis/)
1+
# [Redis](https://hub.docker.com/_/redis/)
22

3-
### 基本信息
3+
## 基本信息
44

55
[Redis](https://en.wikipedia.org/wiki/Redis) 是开源的内存 Key-Value 数据库实现。
66

77
该仓库位于 `https://hub.docker.com/_/redis/` ,提供了 Redis 3.x ~ 5.x 各个版本的镜像。
88

9-
### 使用方法
9+
## 使用方法
1010

1111
默认会在 `6379` 端口启动数据库。
1212

@@ -37,6 +37,6 @@ $ docker run -it --rm \
3737
sh -c 'exec redis-cli -h "$REDIS_PORT_6379_TCP_ADDR" -p "$REDIS_PORT_6379_TCP_PORT"'
3838
```
3939

40-
### Dockerfile
40+
## Dockerfile
4141

4242
请到 https://github.com/docker-library/docs/tree/master/redis 查看。

appendix/repo/ubuntu.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
## [Ubuntu](https://hub.docker.com/_/ubuntu/)
1+
# [Ubuntu](https://hub.docker.com/_/ubuntu/)
22

3-
### 基本信息
3+
## 基本信息
44

55
[Ubuntu](https://en.wikipedia.org/wiki/Ubuntu) 是流行的 Linux 发行版,其自带软件版本往往较新一些。
66

77
该仓库位于 `https://hub.docker.com/_/ubuntu/` ,提供了 Ubuntu 从 12.04 ~ 19.04 各个版本的镜像。
88

9-
### 使用方法
9+
## 使用方法
1010

1111
默认会启动一个最小化的 Ubuntu 环境。
1212

@@ -15,6 +15,6 @@ $ docker run --name some-ubuntu -it ubuntu:18.04
1515
root@523c70904d54:/#
1616
```
1717

18-
### Dockerfile
18+
## Dockerfile
1919

2020
请到 https://github.com/docker-library/docs/tree/master/ubuntu 查看。

appendix/repo/wordpress.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
## [WordPress](https://hub.docker.com/_/wordpress/)
1+
# [WordPress](https://hub.docker.com/_/wordpress/)
22

3-
### 基本信息
3+
## 基本信息
44

55
[WordPress](https://en.wikipedia.org/wiki/WordPress) 是开源的 Blog 和内容管理系统框架,它基于 PHP 和 MySQL。
66

77
该仓库位于 `https://hub.docker.com/_/wordpress/` ,提供了 WordPress 4.x ~ 5.x 版本的镜像。
88

9-
### 使用方法
9+
## 使用方法
1010

1111
启动容器需要 MySQL 的支持,默认端口为 `80`
1212

@@ -20,6 +20,6 @@ $ docker run --name some-wordpress --link some-mysql:mysql -d wordpress
2020
* `WORDPRESS_DB_PASSWORD` 缺省为连接 mysql 容器的环境变量 `MYSQL_ROOT_PASSWORD` 的值
2121
* `WORDPRESS_DB_NAME` 缺省为 `wordpress`
2222

23-
### Dockerfile
23+
## Dockerfile
2424

2525
请到 https://github.com/docker-library/docs/tree/master/wordpress 查看。

cases/os/centos.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
## CentOS/Fedora
1+
# CentOS/Fedora
22

3-
### CentOS 系统简介
3+
## CentOS 系统简介
44

55
`CentOS``Fedora` 都是基于 `Redhat` 的常见 Linux 分支。`CentOS` 是目前企业级服务器的常用操作系统;`Fedora` 则主要面向个人桌面用户。
66

77
![CentOS 操作系统](_images/centos-logo.png)
88

99
CentOS(Community Enterprise Operating System,中文意思是:社区企业操作系统),它是基于 `Red Hat Enterprise Linux` 源代码编译而成。由于 `CentOS``Redhat Linux` 源于相同的代码基础,所以很多成本敏感且需要高稳定性的公司就使用 `CentOS` 来替代商业版 `Red Hat Enterprise Linux``CentOS` 自身不包含闭源软件。
1010

11-
#### 使用 CentOS 官方镜像
11+
### 使用 CentOS 官方镜像
1212

1313
首先使用 `docker search` 命令来搜索标星至少为 `25``CentOS` 相关镜像。
1414

@@ -32,13 +32,13 @@ Status: Downloaded newer image for centos:latest
3232
CentOS Linux release 7.2.1511 (Core)
3333
```
3434

35-
### Fedora 系统简介
35+
## Fedora 系统简介
3636

3737
![Fedora 操作系统](_images/fedora-logo.png)
3838

3939
`Fedora``Fedora Project` 社区开发,红帽公司赞助的 `Linux` 发行版。它的目标是创建一套新颖、多功能并且自由和开源的操作系统。`Fedora` 的功能对于用户而言,它是一套功能完备的,可以更新的免费操作系统,而对赞助商 `Red Hat` 而言,它是许多新技术的测试平台。被认为可用的技术最终会加入到 `Red Hat Enterprise Linux` 中。
4040

41-
#### 使用 Fedora 官方镜像
41+
### 使用 Fedora 官方镜像
4242

4343
首先使用 `docker search` 命令来搜索标星至少为 `2``Fedora` 相关镜像,结果如下。
4444

@@ -64,7 +64,7 @@ Status: Downloaded newer image for fedora:latest
6464
Fedora release 24 (Twenty Four)
6565
```
6666
67-
### 相关资源
67+
## 相关资源
6868
6969
* `Fedora` 官网:https://getfedora.org/
7070
* `Fedora` 官方仓库:https://github.com/fedora-infra

0 commit comments

Comments
 (0)