使用 mac系統,發現docker沒有 docker0網橋,無法直接在宿主機上 訪問 容器的ip,
在測試的時候有這種需求,而不是通過-p的方式,可以參考下面的連接,主要就是
修改 setting.json,加上socket代理端口,然后配置在網絡高級中配置 sockets代理即可。
具體可以參考如下鏈接。
https://github.com/docker/for-mac/issues/2670
For anyone else having trouble following this thread. With a recent version of Docker of Mac, add "socksProxyPort" : 8888, to ~/Library/Group\ Containers/group.com.docker/settings.json(be sure to respect strict json syntax); and restart Docker.
