Add samba

This commit is contained in:
Remi Rampin 2024-03-21 16:32:41 -04:00
parent 82d252167f
commit cc9fea9ba0
1 changed files with 20 additions and 0 deletions

20
samba Normal file
View File

@ -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"]