我在Linux机器上使用过Docker,并且刚开始在Windows上使用它。
我处于一个不幸的位置,他们使用172.17.0.0/16子网与默认的Docker网桥子网冲突。
C:\>docker network inspect bridge
[
{
"Name": "bridge",
"Id": "d6ae8949e4e098ad4443ba2cd72bed5f9f96d81f5d2d00197b9443b8a8c1d1f6"
,
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": null,
"Config": [
{
"Subnet": "172.17.0.0/16"
}
]
},
"Internal": false,
"Containers": {},
"Options": {
"com.docker.network.bridge.default_bridge": "true",
"com.docker.network.bridge.enable_icc": "true",
"com.docker.network.bridge.enable_ip_masquerade": "true",
"com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
"com.docker.network.bridge.name": "docker0",
"com.docker.network.driver.mtu": "1500"
},
"Labels": {}
}
]
我知道Linux(https://docs.docker.com/engine/reference/commandline/dockerd/ bip)可以选择更改此选项。但是Windows还有一个选项吗?
PS。我尝试将"bip": "10.11.12.0/24"
添加到JSON守护程序配置中,但Docker在启动时崩溃: