I have a multi-container app. One of the containers is Mosquitto, running on port 1883.
I’d like to announce/advertise this service via Avahi in the simplest way possible. This would seem to be best done by placing an xml
mqtt.service file into the
/etc/avahi/services/ folder on the host OS. But that folder is read-only, and besides there would appear to be no way to do this during deployment via Balena Cloud.
So I guess I’m stuck with doing something much more complicated involving
dbus and some
Dockerfile shenanigans in a container, but nothing I’ve tried has worked.
<!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">MQTT on %h</name> <service> <type>_mqtt._tcp</type> <port>1883</port> </service> </service-group>