当我尝试通过官方文档设置 Docker 1.9 来制作覆盖网络时,会出现如下错误消息:
root@c0-master:~# docker run -d --name webtest --net myStack3 nginx
a5aec996da782669bc26e5c33064bf6c14ee452a56b1a519136d47c2b9d59859
Error response from daemon: Cannot start container a5aec996da782669bc26e5c33064bf6c14ee452a56b1a519136d47c2b9d59859: subnet sandbox join failed for "10.0.2.0/24": vxlan interface creation failed for subnet "10.0.2.0/24": failed in prefunc: failed to set namespace on link "vxlan48c4dd7": invalid argument
Docker 网络只显示这些简单的消息:
root@c0-master:~# docker network
docker: "network" requires a minimum of 1 argument.
See 'docker network --help'.
Usage: docker network [OPTIONS] COMMAND [OPTIONS]
Commands:
disconnect Disconnect container from a network
inspect Display detailed network information
ls List all networks
rm Remove a network
create Create a network
connect Connect container to a network
Run 'docker network COMMAND --help' for more information on a command.
我记得当我使用 flannel 设置覆盖网络时,它有 etcd 文件和 flannel 文件来指出子网的范围。
我认为这个错误的原因。
docker1.9&swarm如何设置?