@bergus
2016-01-19T11:19:36.000000Z
字数 804
阅读 2102
smb
FROM debian:jessie
MAINTAINER Jens Erat <email@jenserat.de>
VOLUME /srv
EXPOSE 137 138 139 445
ENV DEBIAN_FRONTEND noninteractive
RUN \
apt-get update && \
apt-get install --no-install-recommends -y samba && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/
COPY smb.conf /etc/samba/smb.conf
# Pregenerate password database to prevent warning messages on container startup
RUN /usr/sbin/smbd && sleep 10 && smbcontrol smbd shutdown
ENTRYPOINT /usr/sbin/smbd -FSD -d1 --option=workgroup=${workgroup:-workgroup}
[global]
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
map to guest = bad user
[public]
path = /root/share
guest ok = yes
writeable = yes
browseable = yes
create mask = 0666
directory mask = 0777
docker run -d \
--publish 445:445 \
--publish 137:137 \
--publish 138:138 \
--publish 139:139
--volume /tmp:/root/share \
--name smb \
samba:v1