Sign inSign up

raju6713/cg-samba

By raju6713

•Updated over 5 years ago

Samba file server for Raspberry Pi

Image
0

100K+

raju6713/cg-samba repository overview

Samba file server for Raspberry Pi

Docker container that creates a SMB share.

Container will be configured as samba sharing server and it just needs:

  • host directories to be mounted,
  • users (one or more username:password tuples) provided,
  • shares defined (name, path, users). -u username:password add user account (named 'username'), which is protected by 'password' -s name:path:rw:user1[,user2[,userN]] add share, that is visible as 'name', exposing contents of 'path' directory for read+write (rw) or read-only (ro) is browseable yes (by) or no (bn) access for specified logins user1, user2, .., userN

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

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 with browse-able or not

Logs: Check container logs for confirmation of smbd -- docker logs

Connecting 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.

Tag summary

Content type

Image

Digest

Size

141.3 MB

Last updated

over 5 years ago

docker pull raju6713/cg-samba