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.
rewrite the fast_config and dns part of the advanced network chapter
- Loading branch information
Showing
4 changed files
with
40 additions
and
39 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
##快速配置指南 | ||
|
||
下面是一个跟docker网络相关的命令列表,希望可以让你快速找到需要的信息。有些命令选项只有在docker服务启动的时候才可以执行,而且不能马上生效。 | ||
* -b BRIDGE or --bridge=BRIDGE — 桥接配置 | ||
* --bip=CIDR — 定制docker0的掩码 | ||
* -H SOCKET... or --host=SOCKET... — 它告诉docker从哪个通道来接收run container stop | ||
container这样的命令,也是docker api的地址 | ||
下面是一个跟Docker网络相关的命令列表。 | ||
|
||
* --icc=true|false — 请看下文容器之间的通信 | ||
* --ip-forward=true|false — 请看下文容器之间的通信 | ||
* --iptables=true|false — 请看下文容器之间的通信 | ||
* --mtu=BYTES —请看下文定制docker0 | ||
其中有些命令选项只有在Docker服务启动的时候才能配置,而且不能马上生效。 | ||
* -b BRIDGE or --bridge=BRIDGE --指定容器挂载的网桥 | ||
* --bip=CIDR --定制docker0的掩码 | ||
* -H SOCKET... or --host=SOCKET... --Docker服务端接收命令的通道 | ||
* --icc=true|false --是否支持容器之间进行通信 | ||
* --ip-forward=true|false --请看下文容器之间的通信 | ||
* --iptables=true|false --禁止Docker添加iptables规则 | ||
* --mtu=BYTES --容器网络中的MTU | ||
|
||
下面2个可以在docker服务启动和docker run执行的时候指定,服务启动的时候指定则会为docker run设定默认值,docker run 后面指定可以覆盖默认值。 | ||
* --dns=IP_ADDRESS... — 请看下文dns配置 | ||
* --dns-search=DOMAIN... — 请看下文dns配置 | ||
下面2个命令选项既可以在启动服务时指定,也可以Docker容器启动(`docker run`)时候指定。在Docker服务启动的时候指定则会成为默认值,后面执行`docker run`时可以覆盖设置的默认值。 | ||
* --dns=IP_ADDRESS... --使用指定的DNS服务器 | ||
* --dns-search=DOMAIN... --指定DNS搜索域 | ||
|
||
最后这些选项只有在docker run后执行,因为它是针对容器的特性内容。 | ||
*-h HOSTNAME or --hostname=HOSTNAME — 主机名配置 | ||
*--link=CONTAINER_NAME:ALIAS — link系统 | ||
*--net=bridge|none|container:NAME_or_ID|host —桥接配置 | ||
*-p SPEC or --publish=SPEC — 映射容器端口到宿主主机 | ||
* -P or --publish-all=true|false — 映射容器端口到宿主主机 | ||
最后这些选项只有在`docker run`执行时使用,因为它是针对容器的特性内容。 | ||
* -h HOSTNAME or --hostname=HOSTNAME --配置容器主机名 | ||
* --link=CONTAINER_NAME:ALIAS --添加到另一个容器的连接 | ||
* --net=bridge|none|container:NAME_or_ID|host --配置容器的桥接模式 | ||
* -p SPEC or --publish=SPEC --映射容器端口到宿主主机 | ||
* -P or --publish-all=true|false --映射容器所有端口到宿主主机 |
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