mikebrady / shairport-sync-docker

Docker setup for Shairport Sync
MIT License
49 stars 19 forks source link

Remove `--net host` #16

Closed nettnikl closed 3 years ago

nettnikl commented 3 years ago

Hey, is network_mode: host really needed here or is just there to run avahi? If so, than could you consider removing it/making it optional, as is already have mDNS set up and would like to not have it redundantly running in the shairpod container.

mikebrady commented 3 years ago

Hey, is network_mode: host really needed here or is just there to run avahi?

Yes, it is really needed to make the Shairport Sync service appear on the network the host computer is on and so be visible to other devices. Otherwise, the Shairport Sync service will only be available on the Docker-specific private local network.

nettnikl commented 3 years ago

Okay, so kind of both, if i got you right. Could it be an option to broadcast the service via an external avahi daemon by mapping appropriate paths? I understand this is not a popular approach, so i would roll my own build, however i would be thankful for a hint on how to do so.

mikebrady commented 3 years ago

Yeah -- kind of both. Shairport Sync can be built to use an external mDNS service, though TBH I haven't used it much. The other important thing to note is that AirPlay 2 specifically needs Avahi.

Another possibility might be if you have Avahi and D-Bus running on the host you could allow D-Bus into the Docker image and thereby enable Shairport Sync to make use of the host's Avahi infrastructure (D-Bus is used to communicate with Avahi).

mikebrady commented 3 years ago

Closing this, if that's okay.