This is a simple Avahi Docker image.
The CI automatically checks for updates (e.g. security fixes) several times per day and publishes a new image only when necessary. So, this image could be used with podman-auto-update or Watchtower.
There's a default avahi-daemon.conf.
Usually you can just add one or more service definitions to /etc/avahi/services
.
For more customization you can add your own /etc/avahi/avahi-daemon.conf
or override the whole /etc/avahi
folder.
This will add a Samba service for auto-discovery on Linux and macOS, including Time Machine support.
AVAHI_ROOT=/var/data/samba-avahi
mkdir -p "$AVAHI_ROOT/services"
cat > "$AVAHI_ROOT/smb.service" <<EOF
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_adisk._tcp</type>
<txt-record>sys=waMa=0,adVF=0x100</txt-record>
<txt-record>dk0=adVN=TimeMachine,adVF=0x82</txt-record>
</service>
<service>
<type>_smb._tcp</type>
<port>445</port>
</service>
</service-group>
EOF
docker run --restart always -d --name samba-avahi --net=host -v "$AVAHI_ROOT/services/:/etc/avahi/services/" ghcr.io/ensody/avahi:latest