From c6e9be3fd0479e22a56b94173c642846516c607c Mon Sep 17 00:00:00 2001 From: David Personette Date: Fri, 2 Jan 2015 06:31:20 -0500 Subject: [PATCH] Dockerfile fix up initial smb.conf file --- Dockerfile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 33bdf77..1f057b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,18 @@ COPY samba.sh /usr/bin/ RUN apt-get update -qq && \ apt-get install -qqy --no-install-recommends samba && \ apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* + rm -rf /var/lib/apt/lists/* /tmp/* && \ + useradd smbuser -M && \ + sed -i 's|^\( log file = \).*|\1/dev/stdout|' /etc/samba/smb.conf && \ + sed -i 's|^\( unix password sync = \).*|\1no|' /etc/samba/smb.conf && \ + sed -i '/Share Definitions/,$d' /etc/samba/smb.conf && \ + echo ' security = user' >> /etc/samba/smb.conf && \ + echo ' directory mask = 0775' >> /etc/samba/smb.conf && \ + echo ' force create mode = 0664' >> /etc/samba/smb.conf && \ + echo ' force directory mode = 0775' >> /etc/samba/smb.conf && \ + echo ' force user = smbuser' >> /etc/samba/smb.conf && \ + echo ' force group = users' >> /etc/samba/smb.conf && \ + echo '' >> /etc/samba/smb.conf VOLUME ["/etc/samba"]