wsl2 docker network_mode host 求教

2021-10-08 14:27:10 +08:00
 Latin

win10 wsl2 docker

无法使用网卡 host 模式

已经查阅各个渠道 github google stackoverflow 还没有透彻的解决办法

1222 次点击
所在节点    Docker
5 条回复
smallX
2021-10-08 14:38:25 +08:00
怎么判断 无法使用网卡 host 模式?
AllenHua
2021-10-08 14:43:46 +08:00
据我所知,windows 上 docker desktop 无法使用 host network mode

https://stackoverflow.com/questions/48915458/windows-run-docker-with-network-host-and-access-with-127-0-0-1

> The host networking driver only works on Linux hosts, and is not supported on Docker for Mac, Docker for Windows, or Docker EE for Windows Server.

我 2021-07-19 也踩过坑
Latin
2021-10-08 15:45:21 +08:00
@smallX 因为 hyper-v
Latin
2021-10-08 15:45:47 +08:00
@AllenHua 那就不纠结了 就这样吧 (
brucecao
2021-11-09 17:25:49 +08:00
也弄不明白哦。本想弄个 WSL2 +docker+ clash 透明代理,感觉要崩啊,docker 用 host 模式,咋也进不了 yacd 的模板,明明已经运行很好了,win 里连不上端口。失败!

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/806424

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX