Sign inSign up

elgeeko/samba

By elgeeko

•Updated over 3 years ago

Simple & configurable Samba server

Image
0

597

elgeeko/samba repository overview

⁠Docker image containing a simple samba server

⁠Usage

⁠Create the user map file smb-users:

A user map is read on container start to create the usernames and passwords used by samba shares. Create the file smb-users following the template below. Everything following a '#' is a comment.

# username password [uid group gid]
# examples:
# shareuser password123
# shareuser password123 1000
# shareuser password123 1000 sharegroup 1000

shareuser secretphrase

UID and GID are needed only if you plan to map your local filesystem into the container and you need the permissions to match on the host and within the container. If so, ensure that the users exist on your host filesystem and that you have entered the corresponding usernames, group names, UID and GID into this user map.

⁠Create source volumes

Use docker volumes or your local filesystem for persistent storage of samba shares.

⁠Use a docker volume for a share
docker volume create myshare
⁠Use your local filesystem for a share
mkdir myshare
chown -R shareuser:sharegroup myshare
chmod -R 770 myshare
⁠Create your samba configuration

Create your samba configuration and shares by customizing this template: https://github.com/elgeeko1/samba-docker/blob/main/app/smb.conf⁠

⁠Run the docker container
docker run \
   --volume smb-users:/opt/samba/shares/smb-users:ro \
   --volume smb.conf:/opt/samba/smb.conf:ro \
   --volume myshare:/opt/samba/shares/myshare \
   --network host \
   elgeeko/samba:latest

⁠Source: https://github.com/elgeeko1/samba-docker⁠

Tag summary

Content type

Image

Digest

sha256:6eb02ccd8…

Size

77.1 MB

Last updated

over 3 years ago

docker pull elgeeko/samba