docker-samba
docker-samba copied to clipboard
Add ZeroConf Service Discovery
As this image drops support for legacy protocols including NetBIOS, WINS, and Samba port 139 for security purposes, for Windows clients, Samba won't be shown under network browsing. We could use mDNS and DNS-SD with Samba using Avahi daemon for that but it only works on Linux and OSX machines afaik.
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
<port>445</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=RackMac</txt-record>
</service>
<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-group>
The Samba server automatic network discovery can be added with:
-
wsdd: Via
Windows Explorer | Network
. -
avahi Linux (for example
Ubuntu GNOME Nautilus | Other Locations
.
wsdd
and avahi
don't have a relation to Samba. For example, the avahi
configuration below can make a Samba server and SSH server available in Nautilus:
Windows Explorer:
Avahi smb.service
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
<port>445</port>
</service>
</service-group>
My proposal is to create two separate wsdd
and avahi
containers which can be launched via docker-compose.yml
, for example in my forked dperson/samba
: https://github.com/Erriez/docker-samba/blob/master/docker-compose.yml
My proposal is to create two separate
wsdd
andavahi
containers which can be launched viadocker-compose.yml
, for example in my forkeddperson/samba
: https://github.com/Erriez/docker-samba/blob/master/docker-compose.yml
Yes indeed, the idea is to have sidecar containers to handle that.
Do you have a preference to choose an existing well-maintained and easy to configure wsdd
and avahi
image?
https://hub.docker.com/search?q=avahi&type=image https://hub.docker.com/search?q=wsdd&type=image
I have added these two containers, which announces the host successfully in both worlds, Windows and *nix/OSX.
wsdd:
image: jonasped/wsdd
container_name: wsdd
network_mode: host
restart: unless-stopped
avahi:
image: ydkn/avahi
container_name: avahi
network_mode: host
volumes:
- "./data/avahi/services:/etc/avahi/services"
restart: unless-stopped
Should we add this as a seperate example docker-compose file? I'd be happy to open a pull request.