From cc9fea9ba06bf69d1001bae47f01e302a2e61c38 Mon Sep 17 00:00:00 2001 From: Remi Rampin Date: Thu, 21 Mar 2024 16:32:41 -0400 Subject: [PATCH] Add samba --- samba | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 samba diff --git a/samba b/samba new file mode 100644 index 0000000..dfd0467 --- /dev/null +++ b/samba @@ -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"]