adding healthcheck
This commit is contained in:
parent
20b97f1cd8
commit
df7caa4a98
1 changed files with 7 additions and 3 deletions
10
Dockerfile
10
Dockerfile
|
@ -1,15 +1,19 @@
|
|||
FROM debian:bullseye-slim
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y samba
|
||||
&& apt-get install -y samba smbclient \
|
||||
&& apt-get clean
|
||||
|
||||
ARG SMBUSER=share
|
||||
ARG SMBPW=do_not_use_insecure
|
||||
ENV SMBUSER=share
|
||||
ENV SMBPW=do_not_use_insecure
|
||||
|
||||
RUN groupadd -g 5858 "$SMBUSER" \
|
||||
&& useradd -u 5858 -g 5858 "$SMBUSER" \
|
||||
&& (echo "$SMBPW";echo "$SMBPW") | smbpasswd -sa "$SMBUSER"
|
||||
|
||||
HEALTHCHECK --interval=60s --timeout=15s \
|
||||
CMD smbclient -L '\\\\localhost\\' -U $SMBUSER%$SMBPW
|
||||
|
||||
EXPOSE 137/udp 138/udp 139 445
|
||||
|
||||
RUN mkdir /share && chown $SMBUSER:$SMBUSER /share && chmod 0777 /share
|
||||
|
|
Loading…
Reference in a new issue