Yes, you can run Samba in Docker on a home server and keep it private, but the defaults alone will not get you there. Make SMB3 the minimum protocol, require encryption, run it on host networking with bound interfaces, and keep TCP port 445 off the public internet entirely. Do those four things and a containerised Samba share is a sound private file server. Skip any of them and you have a convenient network drive that leaks more than you think.
TL;DR:
Solo developer with one Linux box and a laptop (for example, a backend dev mounting a code and media archive from a MacBook): Run a maintained Samba image on host networking with server smb encrypt = required , because every modern macOS, Windows and Linux client supports SMB3.
Household with an old scanner or a Windows 7 machine that needs SMB1: Keep SMB1 off the main share and put the legacy device on its own isolated share or VLAN, because turning SMB1 back on weakens every connection to that server.
Remote worker who wants files away from home (for…