21 lines
628 B
Plaintext
21 lines
628 B
Plaintext
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"]
|