I m 试图从Docker集装箱内发现mDNS并使用该集装箱进行操作
sudo docker run --privileged -v /var/run/dbus:/var/run/dbus -v /var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket -d -p 5001:5001 my_application
https://stackoverflow.com/questions/30646943/how-to-avahi-browse- from-a-docker-container”>post/a。
在集装箱内运行瓦希河时,我获得这一产出:
root@38ca93e44ce1:/etc/avahi# avahi-browse -a
+ (null) IPv4 amzn.dmgr:2A9009CCFEAFDF82846897DD0D687295:xnVDMM+4u1:767308 Amazon Fire TV local
+ (null) IPv6 Canon MG7700 series _uscan._tcp local
+ (null) IPv4 Canon MG7700 series _uscan._tcp local
+ (null) IPv6 Canon MG7700 series Secure Internet Printer local
+ (null) IPv4 Canon MG7700 series Secure Internet Printer local
+ (null) IPv6 Canon MG7700 series _scanner._tcp local
+ (null) IPv4 Canon MG7700 series _scanner._tcp local
+ (null) IPv6 Canon MG7700 series Internet Printer local
+ (null) IPv4 Canon MG7700 series Internet Printer local
+ (null) IPv6 Canon MG7700 series UNIX Printer local
+ (null) IPv4 Canon MG7700 series UNIX Printer local
+ (null) IPv4 Canon MG7700 series Web Site local
+ (null) IPv4 Canon MG7700 series _canon-bjnp1._tcp local
+ (null) IPv4 Canon MG7700 series _privet._tcp local
+ (null) IPv6 Canon MG7700 series Web Site local
+ (null) IPv6 Canon MG7700 series _canon-bjnp1._tcp local
+ (null) IPv6 Canon MG7700 series _privet._tcp local
I m 奇怪的是,网络接口栏为何显示(null)以及是否有办法显示适当的接口(wlan0, eth0, 等)。