feat(mdns): optional Avahi .local responder (ENABLE_MDNS)

Self-contained host-network Avahi container publishes the service names over
mDNS so .local works zero-config for guests (macOS/Linux native, Windows needs
Bonjour). Toggle with ENABLE_MDNS=true + BASE_DOMAIN=*.local; build-stack layers
docker-compose.avahi.yml in and builds the image during --prep. mDNS can't serve
the air-gap upstream spoofs (non-.local) — those still need real DNS.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-24 05:56:54 +02:00
parent f14578dc65
commit 8eeda1265c
3 changed files with 54 additions and 0 deletions

8
docker/avahi/Dockerfile Normal file
View File

@@ -0,0 +1,8 @@
# Self-contained mDNS responder: publishes the stack's service names on .local
# so guests resolve them with zero DNS/client config (macOS/Linux native;
# Windows needs Bonjour). Used only when ENABLE_MDNS=true and BASE_DOMAIN=*.local.
FROM alpine:3.20
RUN apk add --no-cache avahi dbus
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]