docker-samba/example/docker-compose.yml

33 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2021-02-19 11:54:25 +00:00
version: '3.4'
networks:
br-samba:
external: false
services:
samba:
image: exp
networks:
- br-samba
ports:
- "137:137/udp"
- "138:138/udp"
- "139:139/tcp"
- "445:445/tcp"
environment:
2021-02-19 22:36:13 +00:00
# create two users: "user1" with uid 1000, smb password password1 and add user1 to group1
2021-02-20 00:27:46 +00:00
# "user2" with uid 1001, smb password password2 and add user2 to group1 and group2
- "USERS=user1,1000,password1,group1;user2,1001,password2,group1,group2"
2021-02-20 00:37:16 +00:00
# create groups with group name "group1" with gid 2000 and "group2" with gid 2001
2021-02-20 00:27:46 +00:00
- "GROUPS=group1,2000;group2,2001"
2021-02-19 22:36:13 +00:00
# launch smbd with extra parameters => -d 2 means log level = 2
- "SMBD_ARGS=-d 2"
2021-02-19 11:54:25 +00:00
restart: unless-stopped
volumes:
2021-02-19 22:36:13 +00:00
# this is the location of the config file
- ./smb.conf:/samba/smb.conf
# these are situational, depending on your smb.conf
- ./private:/samba/private
- ./public:/samba/public
# you might need to tag the above files properly if you are running SELinux