2023-02-28 21:10:17 +00:00
|
|
|
FROM debian:bullseye-slim
|
2020-04-14 12:28:00 +00:00
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get install -y samba
|
|
|
|
|
2023-02-28 23:09:59 +00:00
|
|
|
ARG SMBUSER=share
|
2020-04-14 12:28:00 +00:00
|
|
|
ARG SMBPW=do_not_use_insecure
|
|
|
|
|
2023-02-28 23:09:59 +00:00
|
|
|
RUN groupadd -g 5858 "$SMBUSER" \
|
|
|
|
&& useradd -u 5858 -g 5858 "$SMBUSER" \
|
|
|
|
&& (echo "$SMBPW";echo "$SMBPW") | smbpasswd -sa "$SMBUSER"
|
2020-04-14 12:28:00 +00:00
|
|
|
|
|
|
|
EXPOSE 137/udp 138/udp 139 445
|
|
|
|
|
2023-02-28 23:09:59 +00:00
|
|
|
RUN mkdir /share && chown $SMBUSER:$SMBUSER /share && chmod 0777 /share
|
2020-04-14 12:28:00 +00:00
|
|
|
|
|
|
|
VOLUME /share
|
|
|
|
|
|
|
|
COPY ./etc /etc
|
|
|
|
|
|
|
|
COPY run.sh ./
|
|
|
|
|
|
|
|
CMD ./run.sh
|
|
|
|
|
|
|
|
|