2023-02-28 21:10:17 +00:00
|
|
|
FROM debian:bullseye-slim
|
2020-04-14 12:28:00 +00:00
|
|
|
|
|
|
|
RUN apt-get update \
|
2023-03-03 01:06:31 +00:00
|
|
|
&& apt-get install -y samba smbclient \
|
|
|
|
&& apt-get clean
|
2020-04-14 12:28:00 +00:00
|
|
|
|
2023-03-03 01:06:31 +00:00
|
|
|
ENV SMBUSER=share
|
|
|
|
ENV SMBPW=do_not_use_insecure
|
2020-04-14 12:28:00 +00:00
|
|
|
|
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
|
|
|
|
2023-03-03 01:06:31 +00:00
|
|
|
HEALTHCHECK --interval=60s --timeout=15s \
|
|
|
|
CMD smbclient -L '\\\\localhost\\' -U $SMBUSER%$SMBPW
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|