Code Monkey home page Code Monkey logo

docker-samba-old's Introduction

Docker container that creates a SMB share.

Running

docker run -d -p 445:445 \
  -v /mnt/data:/share/data \
  -v /mnt/backups:/share/backups \
  --name <container name> zaraki673/docker-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.

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.

docker-samba-old's People

Contributors

zaraki673 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

qnm

docker-samba-old's Issues

permission issue

I've come through permission issues

pi@raspberrypi:~ $ docker run -d --network=host -v /mnt/ironwolf:/share/ironwolf -v /home/pi/samba:/share/pi --name rpi-samba trnape/rpi-samb
a -u "pi:abc123" -s "ironwolf:/share/ironwolf:rw:pi" -s "pi:/share/pi:rw:pi"
eecc1029060bd60e72feced59bd107fbf4310bac104d636f389d04118457bab3
pi@raspberrypi:~ $ docker logs rpi-samba
Add user 'pi' with password 'abc123' Added user pi.
DONE
chown: changing ownership of '/share/ironwolf': Operation not permitted

where /mnt lists the mouting points

pi@raspberrypi:~ $ ll /mnt
总用量 264
drwxrwxrwx 1 root root 262144 1月   1  1970 ironwolf
drwxrwxrwx 2 root root   4096 12月  8 00:40 timecapsule
drwxr-xr-x 3 root root   4096 12月 14 02:08 usbdrive
pi@raspberrypi:~ $ lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    0  5.5T  0 disk
├─sda1        8:1    0  200M  0 part
└─sda2        8:2    0  5.5T  0 part /mnt/ironwolf
mmcblk0     179:0    0 29.5G  0 disk
├─mmcblk0p1 179:1    0  256M  0 part /boot
└─mmcblk0p2 179:2    0 29.3G  0 part /

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.