设置网络模式。
Docker中的host模式指定是容器与主机享受相同的network namespace,在这种情况下,我们访问主机端口就能访问我们的容器。
docker run:
--net="host"
这种创建出来的容器,可以看到host上所有的网络设备。
docker-compose.yml:
network_mode: host
http://www.htmltoo.com/