Public Repository

Last pushed: a year ago
Short Description
Samba file server for Raspberry Pi
Full Description

Samba file server for Raspberry Pi

Docker container that creates a SMB share.



docker run -d -p <docker_host_ip>:445:445 \
  -v /mnt/data:/share/data \
  -v /mnt/backups:/share/backups \
  --name <container name> trnape/rpi-samba \
  -u "alice:abc123" \
  -u "bob:secret" \
  -u "guest:guest" \
  -s "Backup directory:/share/backups:rw:alice,bob" \
  -s "Alice (private):/share/data/alice:rw:alice" \
  -s "Bob (private):/share/data/bob:rw:bob" \
  -s "Documents (readonly):/share/data/documents:ro:guest,alice,bob"

This example will bind smbd to docker host ip address
and mount two directories on docker host to container.
Three users will be created and given various access to four shares.


To keep things simple, TCP port 445 is the only exposed port.

Open Finder, then press ⌘K. Enter smb://<docker_host_ip>
and press Connect.
Enter login and password you supplied at the run stage.

Docker Pull Command

Comments (2)
a year ago

@charlesmknox: thx a lot for sharing this, I was all crazy trying to understand what -s meant for docker run, but thanks to your docker-compose.yml file, I could understand what was going on. Using it!

a year ago

Thanks for posting this image.
My experience with this image was that it would not recognize user passwords.

In another image, , the samba share method is set to "user" instead of "share", and user login works.

But the problem with dastrasmue's image was that the container exits with code 0. So I found a fix online and submitted a pull request - but until his image gets updated, you can use mine:

Just sharing so that other people can save a bit of headache. Thanks again for contributing this base image for everyone to work with!