linux - 如何从docker容器中获取宿主机的mac地址等信息
ringa_lee
ringa_lee 2017-04-17 15:24:54
0
2
854

如何从docker容器中获取宿主机的mac地址等信息

ringa_lee
ringa_lee

ringa_lee

reply all(2)
洪涛

The simplest way is to pass the host's MAC address as an environment variable when running the Docker container.

Peter_Zhu

The containers of

docker are isolated in the subnet created by docker daemon, so the MAC of the host host cannot be obtained. This is also in line with the specifications of container isolation. Imagine if the container can directly access the host host, then Container isolation will be broken.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!