Update advanced_network

This commit is contained in:
khs1994
2017-11-29 10:23:42 +08:00
parent a9eb521865
commit 8bf728103b
5 changed files with 48 additions and 26 deletions

View File

@@ -46,7 +46,12 @@ DNAT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 to:172.
注意:
* 这里的规则映射了 0.0.0.0,意味着将接受主机来自所有接口的流量。用户可以通过 `-p IP:host_port:container_port` 或 `-p
IP::port` 来指定允许访问容器的主机上的 IP、接口等以制定更严格的规则。
* 这里的规则映射了 `0.0.0.0`,意味着将接受主机来自所有接口的流量。用户可以通过 `-p IP:host_port:container_port``-p IP::port` 来指定允许访问容器的主机上的 IP、接口等以制定更严格的规则。
* 如果希望永久绑定到某个固定的 IP 地址,可以在 Docker 配置文件 `/etc/default/docker` 中指定 `DOCKER_OPTS="--ip=IP_ADDRESS"`,之后重启 Docker 服务即可生效
* 如果希望永久绑定到某个固定的 IP 地址,可以在 Docker 配置文件 `/etc/docker/daemon.json` 中添加如下内容
```json
{
"ip": "0.0.0.0"
}
```