Skip to content

Commit

Permalink
Add Samba non native 7.1 php docker
Browse files Browse the repository at this point in the history
Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer committed Dec 18, 2018
1 parent 8fa96da commit cbb3deb
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
22 changes: 22 additions & 0 deletions samba-non-native-php7.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 changes: 46 additions & 0 deletions samba-non-native-php7.1/smb.conf
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cbb3deb

Please sign in to comment.