Sign inSign up

nunofgs/avahi

By nunofgs

Updated almost 10 years ago

Automated avahi for Docker containers using docker-gen

Image
0

6.5K

nunofgs/avahi repository overview

Avahi

This is a Dockerfile to set up Avahi.

This container will run an avahi daemon and broadcast services based on other containers.

Dynamically generating services is possible by exporting the following environment variables:

VariableDescription
SERVICE_NAMEThe name of the service broadcasted by avahi
SERVICE_PORTThe port where the service is located
SERVICE_TYPEThe type of service

Usage

First, boot up the container you intend to broadcast the service from. For example, a samba container:

$ docker run \
  -e "SERVICE_NAME=MyServer"
  -e "SERVICE_PORT=445"
  -e "SERVICE_TYPE=_smb._tcp"
  -p 137:137
  -p 138:138
  -p 139:139
  -p 445:455
  -v /mnt/data:/data
  dperson/samba

Next, start up the avahi container which will generate the services dynamically:

$ docker run \
  --net=host
  -v /var/run/docker.sock:/tmp/docker.sock:ro
  nunofgs/avahi

Thanks

A special thank you to nginx-proxy which this project is based on.

Tag summary

Content type

Image

Digest

Size

12.4 MB

Last updated

almost 10 years ago

docker pull nunofgs/avahi