cdzombak/samba-docker
Up-to-date Samba Docker image optimized for NAS file sharing with full macOS Spotlight support.
77
Up-to-date Samba Docker image optimized for NAS file sharing with full macOS Spotlight support via Elasticsearch integration.
TK
testparm
With your docker-compose.yml
set up, you can use testparm
as follows to check your smb.conf
:
docker compose run samba testparm /usr/local/samba/etc/smb.conf
Samba is arguably the most important thing running on my NAS; when I'm browsing files/folders on it, I want it to be as fast as possible. To help achieve this I've added the following to the samba
service in my docker-compose
file:
command:
- ionice
- -c1
- -n1
- nice
- -n-17
- /usr/local/samba/sbin/smbd
- --foreground
- --no-process-group
- --configfile
- /usr/local/samba/etc/smb.conf
cap_add:
- CAP_SYS_NICE
This runs smbd
in the "realtime" IO class, with priority 1
(the possible priorities are 0-7
, with lower numbers being higher priority). To give it priority on the CPU, I also give smbd
a nice
value of -17
(values range down to -19
, the highest priority).
TK
also TK: cpu shares for the ES stuff; and (io)nice values for the same.
TK
TK: necessary if you want samba container to use host networking and listen on 445
apt remove smbclient samba samba-common && apt autoremove
TK: raindrop bookmarks
TK: samba docs in general: smbd, conf, build, general wiki refs
smb.conf
referencesmbd
referencesmbpasswd
referencen.b. Elasticsearch 8.9.0 and newer are not compatible with Samba.
TK: spotlight, es, indexers, samba bugs
Original works in this repo are licensed under GPL3; see LICENSE
in this repo.
docker pull cdzombak/samba-docker