mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-04-25 12:14:46 +02:00
fix samba volumes
This commit is contained in:
parent
c8517a8e7b
commit
1ca5c0fc5e
@ -11,6 +11,9 @@ RUN set -xe \
|
|||||||
|
|
||||||
COPY smb.conf /etc/samba/
|
COPY smb.conf /etc/samba/
|
||||||
|
|
||||||
|
VOLUME /etc/samba \
|
||||||
|
/var/lib/samba
|
||||||
|
|
||||||
EXPOSE 137/udp \
|
EXPOSE 137/udp \
|
||||||
138/udp \
|
138/udp \
|
||||||
139/tcp \
|
139/tcp \
|
||||||
|
@ -13,18 +13,20 @@ samba:
|
|||||||
image: vimagick/samba
|
image: vimagick/samba
|
||||||
volumes:
|
volumes:
|
||||||
- ./smb.conf:/etc/samba/smb.conf
|
- ./smb.conf:/etc/samba/smb.conf
|
||||||
- ./share:/share
|
- /mnt/usb:/share
|
||||||
net: host
|
net: host
|
||||||
restart: always
|
restart: always
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> An USB flash drive is mounted at `/mnt/usb`.
|
||||||
|
|
||||||
## smb.conf
|
## smb.conf
|
||||||
|
|
||||||
```
|
```
|
||||||
[global]
|
[global]
|
||||||
|
netbios name = easypi
|
||||||
workgroup = WORKGROUP
|
workgroup = WORKGROUP
|
||||||
netbios name = EasyPi
|
server string = EasyPi Samba Server
|
||||||
server string = Samba Server
|
|
||||||
server role = standalone
|
server role = standalone
|
||||||
map to guest = bad user
|
map to guest = bad user
|
||||||
usershare allow guests = yes
|
usershare allow guests = yes
|
||||||
|
@ -2,6 +2,6 @@ samba:
|
|||||||
image: vimagick/samba
|
image: vimagick/samba
|
||||||
volumes:
|
volumes:
|
||||||
- ./smb.conf:/etc/samba/smb.conf
|
- ./smb.conf:/etc/samba/smb.conf
|
||||||
- ./share:/share
|
- /mnt/usb:/share
|
||||||
net: host
|
net: host
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[global]
|
[global]
|
||||||
|
netbios name = easypi
|
||||||
workgroup = WORKGROUP
|
workgroup = WORKGROUP
|
||||||
netbios name = EasyPi
|
server string = EasyPi Samba Server
|
||||||
server string = Samba Server
|
|
||||||
dns proxy = no
|
dns proxy = no
|
||||||
log file = /var/log/samba/log.%m
|
log file = /var/log/samba/log.%m
|
||||||
max log size = 1000
|
max log size = 1000
|
||||||
@ -18,6 +18,11 @@ map to guest = bad user
|
|||||||
usershare allow guests = yes
|
usershare allow guests = yes
|
||||||
load printers = no
|
load printers = no
|
||||||
|
|
||||||
|
[homes]
|
||||||
|
comment = Home Directories
|
||||||
|
browseable = no
|
||||||
|
writable = yes
|
||||||
|
|
||||||
[share]
|
[share]
|
||||||
path = /share
|
path = /share
|
||||||
browseable = yes
|
browseable = yes
|
||||||
|
20
samba/smb.conf.sample
Normal file
20
samba/smb.conf.sample
Normal 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
|
Loading…
x
Reference in New Issue
Block a user