Dockerfile fix up initial smb.conf file

This commit is contained in:
David Personette 2015-01-02 06:31:20 -05:00
parent 62e06a63e2
commit c6e9be3fd0

View File

@ -8,7 +8,18 @@ COPY samba.sh /usr/bin/
RUN apt-get update -qq && \ RUN apt-get update -qq && \
apt-get install -qqy --no-install-recommends samba && \ apt-get install -qqy --no-install-recommends samba && \
apt-get clean && \ 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"] VOLUME ["/etc/samba"]