Add samba
This commit is contained in:
parent
82d252167f
commit
cc9fea9ba0
|
@ -0,0 +1,20 @@
|
|||
FROM ubuntu:22.04
|
||||
|
||||
RUN ! grep -E '^[^:]+:[^:]+:101:' /etc/passwd && \
|
||||
! grep -E '^[^:]+:[^:]+:101:' /etc/group && \
|
||||
sed -e 's/^_apt:x:100:/_apt:x:101/' /etc/passwd > /tmp/passwd && \
|
||||
mv /tmp/passwd /etc/passwd
|
||||
RUN groupadd --system smb --gid 101 && \
|
||||
useradd --system -M -g smb --uid 100 smbuser && \
|
||||
passwd -l smbuser
|
||||
RUN apt-get update && \
|
||||
apt-get install -yy \
|
||||
--no-install-recommends \
|
||||
samba \
|
||||
samba-vfs-modules \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
EXPOSE 137/udp 138/tcp 139 445
|
||||
|
||||
CMD ["smbd", "--foreground", "--debuglevel=1", "--debug-stdout", "--no-process-group"]
|
Loading…
Reference in New Issue