flungo-docker / avahi

Docker image for the Avahi mDNS/DNS-SD daemon.
MIT License
66 stars 32 forks source link

Does it really work? #1

Closed wiresio closed 4 years ago

wiresio commented 4 years ago

Sorry for asking, maybe I just don't understand your code:

After adding "avahi-tools" to Dockerfile and sh'ing into the running container I do: avahi-browse --all --resolve which yields: Failed to create client object: Daemon not running

Also with SERVER_ENABLE_DBUS=yes avahi-daemon cannot start.

Which means that I cannot publish any service to avahi-daemon (from other containers).

Ideas / suggestions? Thanks!

farrad commented 4 years ago

For those who may still need this.

Actually DBus installation is missing from this image. I had to additionally:

  1. RUN apk add --no-cache dbus avahi-tools in the Dockerfile.
  2. Start DBus (prior to avahi-daemon) in entrypoint.sh: dbus-daemon --system

Then I was able to SH into the container and avahi-browse -a would show the 2 services advertised inside the container (on my 2 network interfaces):

+   eth1 IPv4 7a3831f8d4cf                                  _ssh._tcp            local
+   eth0 IPv4 7a3831f8d4cf                                  _ssh._tcp            local
+   eth1 IPv4 7a3831f8d4cf                                  _sftp-ssh._tcp       local
+   eth0 IPv4 7a3831f8d4cf                                  _sftp-ssh._tcp       local
wiresio commented 4 years ago

Thanks - I'll try that!