diff --git a/.editorconfig b/.editorconfig index 4856901..a44f301 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,6 +8,6 @@ end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true -[{README.md}] +[{README.md,docker-compose.yml}] indent_style = space indent_size = 2 diff --git a/example/docker-compose.yml b/example/docker-compose.yml new file mode 100644 index 0000000..bd6bd1c --- /dev/null +++ b/example/docker-compose.yml @@ -0,0 +1,26 @@ +samba: + image: joebiellik/samba-server + + volumes: + # You must provide a Samba config file + - ./smb.conf:/config/smb.conf + + # Shares + - ~/projects:/mnt/projects + - ~/videos:/mnt/videos:ro + + ports: + - "137:137/udp" + - "138:138/udp" + - "139:139/tcp" + - "445:445/tcp" + + environment: + - USERNAME=joe + - PASSWORD=samba + + # Defaults + - UID=1000 + - GID=1000 + - GROUP=samba + - CONFIG=/config/smb.conf diff --git a/example/smb.conf b/example/smb.conf new file mode 100644 index 0000000..e354525 --- /dev/null +++ b/example/smb.conf @@ -0,0 +1,38 @@ +[global] + workgroup = WORKGROUP + netbios name = Docker + server string = Samba Server Version %v + + # Uncomment to map SMB user joe to system user root + #admin users = joe + + map to guest = Bad User + security = user + passdb backend = tdbsam + unix password sync = no + name resolve order = bcast host lmhosts wins + + directory mask = 0755 + force create mode = 0644 + force directory mode = 0755 + + syslog = 0 + + load printers = No + printing = bsd + printcap name = /dev/null + disable spoolss = Yes + +[Projects] + comment = Projects + path = /mnt/projects + read only = No + guest ok = No + valid users = joe + +[Videos] + comment = Videos + path = /mnt/videos + read only = Yes + guest ok = Yes + guest only = Yes