Sign inSign up

epandi/avahi

By epandi

Updated over 5 years ago

Arm32v7 Docker image for the Avahi mDNS/DNS-SD daemon. Home-Assistant Google Cast support.

Image
0

10K+

epandi/avahi repository overview

arm32v7 fork of flungo/avahi

Avahi Docker Image

Docker image for the Avahi mDNS/DNS-SD daemon. Built on Alpine Linux to make the image as small as possible. Highly configurable through environment variables to support most usecases which need an Avahi Daemon.

Usage

Basic usage consists of running the docker container with the appropriate environment variables and volumes to achieve your desired behaviour.

Environment variables

Environment variables are made available for all of the options of avahi-daemon.conf. The variable names are in the format <SECTION>_<OPTION> where <SECTION> is the capitalised section name from the configuration file and <OPTION> is the capitalised option name with - replaced by _. The table below outlines the available options:

SectionOptionVariable
serverhost-nameSERVER_HOST_NAME
serverdomain-nameSERVER_DOMAIN_NAME
serverbrowse-domainsSERVER_BROWSE_DOMAINS
serveruse-ipv4SERVER_USE_IPV4
serveruse-ipv6SERVER_USE_IPV6
serverallow-interfacesSERVER_ALLOW_INTERFACES
serverdeny-interfacesSERVER_DENY_INTERFACES
servercheck-response-ttlSERVER_CHECK_RESPONSE_TTL
serveruse-iff-runningSERVER_USE_IFF_RUNNING
serverenable-dbusSERVER_ENABLE_DBUS
serverdisallow-other-stacksSERVER_DISALLOW_OTHER_STACKS
serverallow-point-to-pointSERVER_ALLOW_POINT_TO_POINT
servercache-entries-maxSERVER_CACHE_ENTRIES_MAX
serverclients-maxSERVER_CLIENTS_MAX
serverobjects-per-client-maxSERVER_OBJECTS_PER_CLIENT_MAX
serverentries-per-entry-group-maxSERVER_ENTRIES_PER_ENTRY_GROUP_MAX
serverratelimit-interval-usecSERVER_RATELIMIT_INTERVAL_USEC
serverratelimit-burstSERVER_RATELIMIT_BURST
wide-areaenable-wide-areaWIDE_AREA_ENABLE_WIDE_AREA
publishdisable-publishingPUBLISH_DISABLE_PUBLISHING
publishdisable-user-service-publishingPUBLISH_DISABLE_USER_SERVICE_PUBLISHING
publishadd-service-cookiePUBLISH_ADD_SERVICE_COOKIE
publishpublish-addressesPUBLISH_PUBLISH_ADDRESSES
publishpublish-hinfoPUBLISH_PUBLISH_HINFO
publishpublish-workstationPUBLISH_PUBLISH_WORKSTATION
publishpublish-domainPUBLISH_PUBLISH_DOMAIN
publishpublish-dns-serversPUBLISH_PUBLISH_DNS_SERVERS
publishpublish-resolv-conf-dns-serversPUBLISH_PUBLISH_RESOLV_CONF_DNS_SERVERS
publishpublish-aaaa-on-ipv4PUBLISH_PUBLISH_AAAA_ON_IPV4
publishpublish-a-on-ipv6PUBLISH_PUBLISH_A_ON_IPV6
reflectorenable-reflectorREFLECTOR_ENABLE_REFLECTOR
reflectorreflect-ipvREFLECTOR_REFLECT_IPV
rlimitsrlimit-asRLIMITS_RLIMIT_AS
rlimitsrlimit-coreRLIMITS_RLIMIT_CORE
rlimitsrlimit-dataRLIMITS_RLIMIT_DATA
rlimitsrlimit-fsizeRLIMITS_RLIMIT_FSIZE
rlimitsrlimit-nofileRLIMITS_RLIMIT_NOFILE
rlimitsrlimit-stackRLIMITS_RLIMIT_STACK
rlimitsrlimit-nprocRLIMITS_RLIMIT_NPROC

If you find an option you require is missing, report this or make a PR adding that feature.

Example using Avahi in combination with Home Assistant (for cast mdns support)

docker-compose yaml

physical network where the cast devices are located: 10.0.x.x, subnet 255.255.252.0, gateway 10.0.0.1, avahi docker ip set to 10.0.0.199

internal mdns docker network name "avahi_mdns"

version: '2.2'
services:
  mdns-reflector:
    image: epandi/avahi
    environment:
      - REFLECTOR_ENABLE_REFLECTOR=yes
    restart: always
    networks:
      outside:
        ipv4_address: 10.0.0.199
      inside:

networks:
  inside:
    name: avahi_mdns
    driver: bridge
    ipam:
      config:
        - subnet: 172.20.2.0/24
          gateway: 172.20.2.1
  outside:
    name: physical
    driver: macvlan
    driver_opts:
      parent: eth0
    ipam:
      config:
        - subnet: 10.0.0.0/22
          gateway: 10.0.0.1

Home Assistant docker-compose.yaml

(use network_mode: avahi_mdns)

version: "2.2"
services:
  home-assistant:
    image: homeassistant/home-assistant:latest
    environment:
      - TZ=Europe/Amsterdam
    volumes:
      - /etc/localtime:/etc/localtime:ro 
      - /etc/timezone:/etc/timezone:ro 
      - /home/pi/Docker/home-assistant/data/config:/config
    ports:
      - "8123:8123"
    network_mode: avahi_mdns
    restart: unless-stopped

Tag summary

Content type

Image

Digest

Size

4.1 MB

Last updated

over 5 years ago

docker pull epandi/avahi