Docker Gateway image and mDNS

When my Gateway was installed as a deb package on my raspberry Pi 4, it recognised my own built webthing by domain name. This name is not in my pi4’s /etc/hosts file, so, as I do not run a DNS server on my LAN, it must have got the name via mDNS.

Now I moved the Gateway to a docker image using the host network (on a stock docker image) & some config/db.sqlite3 voodoo to connect to my existing account. I can access my own built webthings by IP, but not by domain name any longer.

So it seems that mDNS is broken in the docker image.

Is your Docker container using host networking? That is required for mDNS to work.

If you’re interested, we had a long discussion about mDNS inside the image about a year ago:

Yes, I use host networking:

docker run \
      -d \
      -e TZ=<my TZ> \
      -v /home/pi/docker-local-files/webthings-gateway:/home/node/.webthings \
      --network="host" \
      --log-opt max-size=1m \
      --log-opt max-file=10 \
      --name webthings-gateway \

Indeed an interesting discussion. If I understand correctly, all issues were resolved.

Hi - so what was the outcome of this - I cannot reach my MDNS hosts from inside the container. The gateway name gateway cannot be seen from the linux host using ahi-browse -a -t --resolve | grep gateway.

I saw in some discourse that dbus need to be off in a config file - couldnt figure our which file - there is an avahi conf file - has the domain config commented out.

Can someone assist?

Sorry, but I still have not figured it out.