Try to build up a samba server in docker.
This commit is contained in:
24
networking/Dockerfile
Normal file
24
networking/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM alpine
|
||||
|
||||
ARG VERSION
|
||||
|
||||
|
||||
RUN set -xe && \
|
||||
apk add --no-cache \
|
||||
samba-server \
|
||||
samba-common-tools \
|
||||
|
||||
VOLUME /share
|
||||
VOLUME /etc/samba
|
||||
|
||||
COPY smb.conf /etc/samba/
|
||||
|
||||
EXPOSE 137/udp 138/udp 139/tcp 445/tcp
|
||||
|
||||
ENTRYPOINT ["/usr/bin/entrypoint.sh"]
|
||||
|
||||
CMD nmbd --daemon && \
|
||||
smbd --foreground \
|
||||
--log-stdout \
|
||||
--no-process-group \
|
||||
--configfile /etc/samba/smb.conf
|
||||
@@ -5,6 +5,8 @@ volumes:
|
||||
name: pihole
|
||||
dnsmasq:
|
||||
name: dnsmasq
|
||||
samba-config:
|
||||
name: samba-config
|
||||
|
||||
# smokeping:
|
||||
# name: smokeping
|
||||
@@ -68,7 +70,6 @@ services:
|
||||
- pihole:/etc/pihole/
|
||||
- dnsmasq:/etc/dnsmasq.d/
|
||||
|
||||
|
||||
unbound:
|
||||
image: mvance/unbound
|
||||
container_name: unbound
|
||||
@@ -82,6 +83,19 @@ services:
|
||||
- "53:53/udp"
|
||||
restart: always
|
||||
|
||||
samba:
|
||||
build: .
|
||||
container_name: samba
|
||||
environment:
|
||||
TZ: Europe/Berlin
|
||||
network_mode: host
|
||||
restart: unless-stopped
|
||||
stdin_open: true
|
||||
tty: true
|
||||
volumes:
|
||||
- samba-config:/etc/samba
|
||||
- /media/backup:/share
|
||||
|
||||
|
||||
# smokeping:
|
||||
# image: lscr.io/linuxserver/smokeping
|
||||
|
||||
25
networking/smb.conf
Normal file
25
networking/smb.conf
Normal file
@@ -0,0 +1,25 @@
|
||||
[global]
|
||||
workgroup = WORKGROUP
|
||||
server string = Odroid
|
||||
server role = standalone server
|
||||
hosts allow = 192.168.178. 127.
|
||||
security = user
|
||||
guest account = nobody
|
||||
passdb backend = tdbsam
|
||||
dns proxy = no
|
||||
|
||||
load printers = no
|
||||
printcap name = /dev/null
|
||||
disable spoolss = yes
|
||||
|
||||
directory mask = 0755
|
||||
force create mode = 0644
|
||||
force directory mode = 0755
|
||||
|
||||
[data]
|
||||
comment = Data
|
||||
path = /share
|
||||
read only = no
|
||||
writable = yes
|
||||
printable = no
|
||||
guest ok = no
|
||||
Reference in New Issue
Block a user