-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Thanks for providing a x-plat ZeroConf crate.
I had challenges getting the Example to work in a Linux container.
IIUC, the crate requires libavahi-compat-libdnssd-dev
and dbus
and avahi-daemon
services.
When containerizing, I used:
ENTRYPOINT ["bash", "-c", "service dbus start && service avahi-daemon start && ./server"]
I think this (more commonly putting the commands in a script file) is the preferred way to start daemons needed for an executable
But I was unable to browse the service from the host as expected.
If I ran the commands manually (outside) of a subshell, it worked.
By adding a small delay between starting the daemons and running the server
, the problem appears solved, i.e.:
ENTRYPOINT ["bash", "-c", "service dbus start && service avahi-daemon start && delay 2s && ./server"]
I'm reporting this here in the hopes that it helps someone else avoid -- what was for me -- an unexpected issue (and solution)
See: https://stackoverflow.com/questions/65043317/challenged-accessing-containerized-dns-sd/