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.
Use docker volumes or your local filesystem for persistent storage of samba shares.
docker volume create myshare
mkdir myshare
chown -R shareuser:sharegroup myshare
chmod -R 770 myshare
Create your samba configuration and shares by customizing this template: https://github.com/elgeeko1/samba-docker/blob/main/app/smb.conf
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
Content type
Image
Digest
sha256:6eb02ccd8…
Size
77.1 MB
Last updated
over 3 years ago
docker pull elgeeko/samba