Docker Community Forums

Share and learn in the Docker community.

Sharing host mDNS


(Lkm1321) #1

Summary

I’m using the ros/kinetic docker image (a ubuntu:16.04 derivative) to contain all my dependencies for an embedded project running Yocto. I’m sharing the host network stack. On the Yocto host I’m running Avahi mDNS which works fine, but I cannot get mDNS to work inside docker unless I also run avahi-daemon inside the docker. To prevent confusion I’m running the avahi-daemon inside docker with disable-publishing set to ‘yes’, and enable-dbus set to ‘no’ just to avoid bloat. Nonetheless I’d prefer a cleaner solution where avahi-daemon on the Yocto host handling everything. Any ideas?

Run command

    docker run -it --privileged \ 
    --name=intel-aero-docker \
    --net=host \ # share network stack. 
    -e QT_GRAPHICSSYSTEM="native" \  
    -e DISPLAY \
    -e QT_X11_NO_MITSHM=1 \
    -u acfr \
    -v /tmp/.X11-unix:/tmp/.X11-unix:rw \ 
    --device=/dev/dri:/dev/dri \
    lkm1321/intel-aero-acfr:latest

Observations

On the Yocto host:

Ping yocto-host.local works
Ping my-laptop.local works

Inside docker without avahi-daemon running

Ping yocto-host.local does not work
Ping my-laptop.local does not work

Inside docker with avahi-daemon running

Ping yocto-host.local works
Ping my-laptop.local works