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 / WORKDIR /
COPY Service-check.sh . COPY Service-check.sh .
RUN apt-get update && apt-get upgrade -y RUN apt-get update && apt-get upgrade -y
RUN apt-get install apt-transport-https wget samba samba-common -y && \ RUN apt-get install apt-transport-https wget samba samba-common unison -y && \
mkdir /media/storage /data && \ mkdir /media/storage /data /data/samba /data/webmin
chmod 0777 /media/storage /data /data/samba /data/webmin && \
ln -s /etc/samba /data && ln -s /etc/webmin /data VOLUME /data
RUN chmod -R 0777 /media/storage /data
RUN echo "deb https://download.webmin.com/download/repository sarge contrib" >> /etc/apt/sources.list && \ RUN echo "deb https://download.webmin.com/download/repository sarge contrib" >> /etc/apt/sources.list && \
cd /root && \ 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 sed -i 's/ssl=1/ssl=0/g' /etc/webmin/miniserv.conf
RUN echo root:webmin | chpasswd RUN echo root:webmin | chpasswd
VOLUME /data
CMD [ "/bin/bash","/Service-check.sh" ] CMD [ "/bin/bash","/Service-check.sh" ]

View File

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