A simple and super lightweight Samba docker container, based on the latest Alpine Linux base image 🐧🐋💻.
By default, the share will be accessible read-only for everyone, with write access for user "rio" with password "letsdance". See smb.conf for details, or feel free to use your own config (see below).
Runs Samba's smbd and nmbd within the same container, using supervisord. Due to the fact that nmbd wants to broadcast and become the "local master" on your subnet, you need to supply the "--net=host" flag to make the server visible to the hosts subnet (likely your LAN).
Quick start for the impatient:
docker run -d --net=host -v /path/to/share/:/share --name samba babim/sambaWhen NetBIOS discovery is not needed
docker run -d -p 137-139:137-139 -p 445:445 -v /path/to/share/:/share --name samba babim/sambaWith your own smb.conf and supervisord.conf configs:
docker run -d -p 137-139:137-139 -p 445:445 -v /path/to/configs/:/config -v /path/to/share/:/share --name samba babim/sambaTo have the container start when the host boots, add docker's restart policy:
docker run -d --restart=always -p 137-139:137-139 -p 445:445 -v /path/to/share/:/share --name samba babim/sambaUSER
PASS
auid
agid
WORKGROUP
USER = samba
PASS = samba
auid/agid = 1000/1000
WORKGROUP = WORKGROUP
-e PUBLICFOLDER="public1 public2 public3"
-e PRIVATEFOLDER="private1 private2 private3"
Docker will auto create folder