Browse Source

Add Samba non native 7.1 php docker

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
tags/server-2
Roeland Jago Douma 9 months ago
parent
commit
cbb3deb608
No account linked to committer's email address
2 changed files with 68 additions and 0 deletions
  1. 22
    0
      samba-non-native-php7.1/Dockerfile
  2. 46
    0
      samba-non-native-php7.1/smb.conf

+ 22
- 0
samba-non-native-php7.1/Dockerfile View File

@@ -0,0 +1,22 @@
# Based upon https://hub.docker.com/r/silvershell/samba/
FROM nextcloudci/php7.1:php7.1-16

ENV SMB_USER smbuser
ENV SMB_PASSWORD smbpassword

RUN apt-get update

RUN apt-get install -y samba smbclient
RUN mkdir -p /opt/samba/share
RUN chmod 777 /opt/samba/share

RUN mkdir -p /opt/samba/user
RUN chmod 777 /opt/samba/user

RUN useradd -s /bin/false "$SMB_USER"
RUN (echo "$SMB_PASSWORD"; echo "$SMB_PASSWORD" ) | pdbedit -a -u "$SMB_USER"

EXPOSE 137/udp 138/udp 139 445

COPY smb.conf /etc/samba/smb.conf


+ 46
- 0
samba-non-native-php7.1/smb.conf View File

@@ -0,0 +1,46 @@
[global]
security = user
load printers = no
printcap name = /dev/null
printing = bsd
unix charset = UTF-8
dos charset = CP932
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
dns proxy = no
interfaces = eth* lo
bind interfaces only = no
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = Bad User
usershare allow guests = yes

[public]
path = /opt/samba/share
writable = yes
printable = no
public = yes
guest only = yes
create mode = 0777
directory mode = 0777

[user]
path = /opt/samba/user
writable = yes
printable = no
public = no
create mode = 0777
directory mode = 0777

Loading…
Cancel
Save