avahi
avahi copied to clipboard
Avahi and docker containers
This is question, perhaps a feature request
situation: I setup a debian system running several services (mpd, shairport-sync, spotifyd, upmpd). All these services advertise their existence by avahi. So far so good. I added ifi-tidal-stream to be able to play tidal via tidal connect. Unfortunately the software require very old libs. On a buster based system such libs are not available. So i decide to setup a docker container. In order to enable the tidal app on my mobil phone to see that tidal connect service i need avahi. So i installed avahi inside the server. No i get's tricky: One avahi-daemon is running on the host, one is running inside the docker container. If i use "host-network" in docker (the same network and ip inside docker like on the host) avahi "struggle" because there are two avahi daemons on the same host/the same ip. Most of the time i "loose" some services. If i use "bridge-network" the avahi daemon inside the docker container advertise the service (perhaps) but nobody see that because it is a different network.... There is a third option "macvlan" which perhaps works. In that case docker creates virtual lan which seems to be connected to the real network. But this macvlan has to be defined manually. Because the device i prepare is not for me and will be used and connected to several network (from non-IT-guys) i can't go for these option. Currently i a use a simple workaround. I wrote a *service file (manually) on the host which advertise the service which runs inside the docker container and forward the port of the host to the container. But this is "only" a manual workaround.
problem: I have no idea how to use and to setup avahi service inside docker containers in conjunction with avahi service on the host system. Is there a way that a avahi inside a docker "forward" its service to the avahi on the host which advertise it tho the network? Is there a way to run a avahi-daemon on the host in conjunction with an avahi inside docker with "hot-network", means the same ip, without any problems? Is there any strategy for avahi and containers