Samba in Docker
Go to file
quackerd fc1b582087
All checks were successful
continuous-integration/drone/push Build is passing
Update '.drone.yml'
2021-04-05 06:20:41 +00:00
example Update 'example/docker-compose.yml' 2021-02-20 00:37:16 +00:00
.drone.yml Update '.drone.yml' 2021-04-05 06:20:41 +00:00
add-user-group.py +README 2021-02-19 19:27:46 -05:00
Dockerfile initial commit 2021-02-19 06:54:25 -05:00
LICENSE Update 'LICENSE' 2021-02-19 11:49:54 +00:00
README.md bump to 4.13.3-r2 2021-03-13 18:11:11 +00:00
run.sh change example 2021-02-19 17:36:13 -05:00

docker-samba

Build Status

What is this?

This is Samba server in Docker. The image is designed for flexbility and maintainability. You are expected to supply your own smb.conf and user/group configs. You also need to maintain the proper permissions for shared folders, which usually only need to be done correctly once at the beginning.

TL;DR: if you are familiar with Samba configuration, this image is for you.

Usage

Volumes

  • /samba/smb.conf: the Samba configuration file that the container uses.
  • /samba/[share]: please map your Samba share folders to /samba/ in the container.

Environment Variables

  • GROUPS: group configurations. Format: [group name],[group id]. Connect multiple group configs with ;.
  • USERS: user configurations. Format: [username],[user id],[samba password],[additional group names*]. *: this option is optional and you can specify multiple groups using , as separator.
  • SMBD_ARGS: additional parameters for smbd. E.g. -d 2 which enables debug output.

docker-compose

Please see the example folder.

Updating

docker-compose pull && docker-compose down && docker-compose up -d

Troubleshooting

It's always helpful to add -d 2 to SMBD_ARGS for samba debug output.

Q: I can't access mounted config file or directories?

Are you running SELinux? If so you need to set the correct tag on mounted volumes chcon -t svirt_sandbox_file_t [your file/folder]