从最近合并到docker 17.06版本的this PR中,我们现在可以支持使用swarm服务进行主机网络。然而,当我尝试使用非常类似的命令时,我看到了一个错误:
$ docker service create --name nginx-host --network host nginx
Error response from daemon: could not find the corresponding predefined swarm network: network host not found
我正在运行17.06版本的候选版:
$ docker version
Client:
Version: 17.06.0-ce-rc2
API version: 1.30
Go version: go1.8.3
Git commit: 402dd4a
Built: Wed Jun 7 10:07:14 2017
OS/Arch: linux/amd64
Server:
Version: 17.06.0-ce-rc2
API version: 1.30 (minimum version 1.12)
Go version: go1.8.3
Git commit: 402dd4a
Built: Wed Jun 7 10:06:06 2017
OS/Arch: linux/amd64
Experimental: true
我的命令与docker现在支持的有何不同?
yml
配置文件中获取--network host
功能,而不是从命令行获取? - dev93