allowing user to be configured with with env
This commit is contained in:
parent
3c364d3eef
commit
e744867a13
1 changed files with 5 additions and 5 deletions
10
Dockerfile
10
Dockerfile
|
@ -3,16 +3,16 @@ FROM debian:bullseye-slim
|
|||
RUN apt-get update \
|
||||
&& apt-get install -y samba
|
||||
|
||||
ARG USER=share
|
||||
ARG SMBUSER=share
|
||||
ARG SMBPW=do_not_use_insecure
|
||||
|
||||
RUN groupadd -g 5858 "$USER" \
|
||||
&& useradd -u 5858 -g 5858 "$USER" \
|
||||
&& (echo "$SMBPW";echo "$SMBPW") | smbpasswd -sa "$USER"
|
||||
RUN groupadd -g 5858 "$SMBUSER" \
|
||||
&& useradd -u 5858 -g 5858 "$SMBUSER" \
|
||||
&& (echo "$SMBPW";echo "$SMBPW") | smbpasswd -sa "$SMBUSER"
|
||||
|
||||
EXPOSE 137/udp 138/udp 139 445
|
||||
|
||||
RUN mkdir /share && chown share:share /share && chmod 0777 /share
|
||||
RUN mkdir /share && chown $SMBUSER:$SMBUSER /share && chmod 0777 /share
|
||||
|
||||
VOLUME /share
|
||||
|
||||
|
|
Loading…
Reference in a new issue