1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:31 +02:00

fix samba volumes

This commit is contained in:
kev 2016-04-12 18:28:27 +08:00
parent c8517a8e7b
commit 1ca5c0fc5e
5 changed files with 36 additions and 6 deletions

View File

@ -11,6 +11,9 @@ RUN set -xe \
COPY smb.conf /etc/samba/
VOLUME /etc/samba \
/var/lib/samba
EXPOSE 137/udp \
138/udp \
139/tcp \

View File

@ -13,18 +13,20 @@ samba:
image: vimagick/samba
volumes:
- ./smb.conf:/etc/samba/smb.conf
- ./share:/share
- /mnt/usb:/share
net: host
restart: always
```
> An USB flash drive is mounted at `/mnt/usb`.
## smb.conf
```
[global]
netbios name = easypi
workgroup = WORKGROUP
netbios name = EasyPi
server string = Samba Server
server string = EasyPi Samba Server
server role = standalone
map to guest = bad user
usershare allow guests = yes

View File

@ -2,6 +2,6 @@ samba:
image: vimagick/samba
volumes:
- ./smb.conf:/etc/samba/smb.conf
- ./share:/share
- /mnt/usb:/share
net: host
restart: always

View File

@ -1,7 +1,7 @@
[global]
netbios name = easypi
workgroup = WORKGROUP
netbios name = EasyPi
server string = Samba Server
server string = EasyPi Samba Server
dns proxy = no
log file = /var/log/samba/log.%m
max log size = 1000
@ -18,6 +18,11 @@ map to guest = bad user
usershare allow guests = yes
load printers = no
[homes]
comment = Home Directories
browseable = no
writable = yes
[share]
path = /share
browseable = yes

20
samba/smb.conf.sample Normal file
View File

@ -0,0 +1,20 @@
[global]
netbios name = easypi
workgroup = WORKGROUP
server string = EasyPi Samba Server
server role = standalone
map to guest = Bad User
usershare allow guests = yes
[homes]
comment = Home Directories
browseable = no
writable = yes
[share]
comment = Public File Sharing
path = /share
browseable = yes
writable = yes
guest ok = yes
admin users = root