Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using astro-dnssd-based code within (Linux) containers #16

Open
DazWilkin opened this issue Nov 30, 2020 · 0 comments
Open

Using astro-dnssd-based code within (Linux) containers #16

DazWilkin opened this issue Nov 30, 2020 · 0 comments

Comments

@DazWilkin
Copy link

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant