Public Repository

Last pushed: 2 years ago
Short Description
Avahi mDNS container for docker hosts
Full Description

Tags and Dockerfiles

avahi container for docker

Docker host discovery using Avahi mDNS. This is useful when using docker machine or Docker for Mac with native/port-forwarding=false

Running

docker run -d --name avahi-docker --net host --restart always -e AVAHI_HOST=docker danisla/avahi:latest

ping docker.local

Use docker.local to access the docker host.

Optional bash helper function:

function docker-avahi() {
  AVAHI_HOST=$1
  [[ -z $AVAHI_HOST ]] && echo "USAGE: docker-avahi <host name>" && return 1
  docker run -d --name avahi-${AVAHI_HOST} --net host --restart always -e AVAHI_HOST=${AVAHI_HOST} danisla/avahi:latest
}

Run using: docker-avahi docker to create the docker.local service.

Known issues

After restarting the docker host, the avahi container sometimes gets stuck in a restarting loop, kill and restart it to fix.

Docker Pull Command
Owner
danisla

Comments (0)