forked from yeasy/docker_practice
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
35 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
Docker —— 从入门到实践 | ||
=============== | ||
|
||
v0.1.6 | ||
v0.1.8 | ||
|
||
[Docker](docker.com)是个伟大的项目,它彻底释放了虚拟化的威力! | ||
[Docker](docker.com)是个伟大的项目,它让虚拟化变得前所未有的高效和轻松,彻底释放了虚拟化的威力! | ||
|
||
本书最初源于[WaitFish](mailto:[email protected])的"Docker学习手册v1.0" pdf内容,后来,[yeasy](github.com/yeasy) | ||
本书最初源于[WaitFish](mailto:[email protected])的"Docker学习手册v1.0" pdf内容。后来,[yeasy](github.com/yeasy) | ||
根据最新Docker版本对内容进行了修订和重写,并增加了部分内容;与[WaitFish](mailto:[email protected])协商,将所有内容开源,采用互联网合作的方式进行创作和维护。 | ||
|
||
本书既适用于具备基础Linux知识的Docker初学者,也可供希望理解原理和底层实现的高级用户参考。同时,本书中给出的实践案例,可供在进行实际部署时借鉴。 | ||
|
@@ -16,6 +16,6 @@ v0.1.6 | |
.com/yeasy/docker_practice)。 | ||
欢迎大家参与,提交pull request。 | ||
|
||
另外,欢迎大家加入QQ群(341410255)一起交流学习,共同提高。 | ||
另外,欢迎大家加入Docker QQ群(341410255)一起交流学习,共同提高。 | ||
|
||
本书发布时,docker的最新版本为1.20。 |
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
#docker高级网络配置 | ||
当docker启动时,会在主机上创建一个docker0的虚拟网卡。他随机挑选RFC1918私有网络中的一段地址给docker0。比如172.17.42.1/16,16位掩码的网段可以拥有65534个地址可以使用,这对主机和容器来说应该足够了。 | ||
注意:本章介绍docker的高级网络配置,一般情况下你不需要知道这些也可以使docker正常工作。简单的网络配置和介绍请看第五章内容。 | ||
#高级网络配置 | ||
当Docker启动时,会在主机上创建一个docker0的虚拟网卡。他随机挑选RFC1918私有网络中的一段地址给docker0。比如`172.17.42.1/16`,16位掩码的网段可以提供65534个地址供使用,这对主机和容器来说应该足够了。 | ||
|
||
本章将介绍Docker的高级网络配置,一般情况下你不需要知道这些也可以使Docker正常工作。简单的网络配置和介绍请看第五章内容。 | ||
docker0 不是普通的网卡,他是桥接到其他网卡的虚拟网卡,容器使用它来和主机相互通信。当创建一个docker容器的时候,它就创建了一个对接口,当数据包发送到一个接口时,另外一个接口也可以收到相同的数据包,它们是绑在一起的一对孪生接口。这对接口在容器中那一端的的名字是eth0,宿主主机端的会指定一个唯一的名字,比如vethAQI2QT这样的名字,这种接口名字不再主机的命名空间中。所有的veth*的接口都会桥接到docker0,这样docker就创建了在主机和所有容器之间一个虚拟共享网络。 | ||
|
||
|
||
![Docker网络](../images/docker0.png) | ||
![Docker网络](../_images/docker0.png) | ||
|
||
接下来的部分将介绍在一些场景中,docker所有的网络定制配置。linux的原生命令将调整、补充、甚至替换docker默认的网络配置。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters