volume mounting issues fix

This commit is contained in:
piersonjarvis 2018-11-19 10:32:36 -08:00
parent 036e890f52
commit fd9e02994e
2 changed files with 8 additions and 7 deletions

View File

@ -3,10 +3,12 @@ EXPOSE 80 139 445
WORKDIR /
COPY Service-check.sh .
RUN apt-get update && apt-get upgrade -y
RUN apt-get install apt-transport-https wget samba samba-common -y && \
mkdir /media/storage /data && \
chmod 0777 /media/storage /data /data/samba /data/webmin && \
ln -s /etc/samba /data && ln -s /etc/webmin /data
RUN apt-get install apt-transport-https wget samba samba-common unison -y && \
mkdir /media/storage /data /data/samba /data/webmin
VOLUME /data
RUN chmod -R 0777 /media/storage /data
RUN echo "deb https://download.webmin.com/download/repository sarge contrib" >> /etc/apt/sources.list && \
cd /root && \
@ -24,5 +26,4 @@ RUN sed -i 's/10000/80/g' /etc/webmin/miniserv.conf && \
sed -i 's/ssl=1/ssl=0/g' /etc/webmin/miniserv.conf
RUN echo root:webmin | chpasswd
VOLUME /data
CMD [ "/bin/bash","/Service-check.sh" ]

View File

@ -1,11 +1,11 @@
#!/bin/bash
unison -batch /etc/samba /data/samba
unison -batch /etc/webmin /data/webmin
apt-get update && apt-get upgrade -y
wait
service webmin start
service smbd start
service nmbd start
ln -s /data/samba /etc/samba
ln -s /data/webmin /etc/webmin
while true
do
if [[ $(service webmin status) = *stopped* ]]