-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Roeland Jago Douma <[email protected]>
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |