A container running its own avahi-daemon collides with the host's on :5353. Instead publish to the host avahi over its mounted D-Bus socket using avahi-tools (avahi-publish). Needs apparmor=unconfined (docker-default blocks the D-Bus publish). Documented host prereqs incl. allow-interfaces for multi-bridge hosts. Tested: publish reaches host avahi and registers the names; on hosts with many docker bridges avahi self-collides until restricted to the LAN interface. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
10 lines
451 B
Docker
10 lines
451 B
Docker
# Publishes the stack's service names on .local via the HOST's avahi-daemon
|
|
# (over its D-Bus socket — no second daemon, avoids the :5353 collision).
|
|
# Requires the host to run avahi-daemon and the socket to be mounted (see
|
|
# docker-compose.avahi.yml). Used when ENABLE_MDNS=true and BASE_DOMAIN=*.local.
|
|
FROM alpine:3.20
|
|
RUN apk add --no-cache avahi-tools
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
ENTRYPOINT ["/entrypoint.sh"]
|