volume mounting issues fix
This commit is contained in:
parent
036e890f52
commit
fd9e02994e
11
Dockerfile
11
Dockerfile
@ -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" ]
|
||||
|
@ -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* ]]
|
||||
|
Loading…
Reference in New Issue
Block a user