From 907938b1f6d47439f4a4e7abf58a755e90a3e046 Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Sun, 29 Jun 2014 12:18:05 +0530 Subject: [PATCH] changed path of the data store from /app/data to /data --- Dockerfile | 2 +- init | 28 ++++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 15e1014..189b40b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,5 +15,5 @@ RUN chmod 755 /init EXPOSE 53/udp EXPOSE 10000 -VOLUME ["/app/data"] +VOLUME ["/data"] CMD ["/init"] diff --git a/init b/init index 36fc8a2..2154b37 100755 --- a/init +++ b/init @@ -6,35 +6,35 @@ ROOT_PASSWORD=$(pwgen -c -n -1 12) echo "root:$ROOT_PASSWORD" | chpasswd echo User: root Password: $ROOT_PASSWORD -chmod 775 /app/data +chmod 775 /data # create directory for bind config -mkdir -p /app/data/bind -chown -R root:bind /app/data/bind +mkdir -p /data/bind +chown -R root:bind /data/bind # populate default bind configuration if it does not exist -if [ ! -d /app/data/bind/etc ]; then - mv /etc/bind /app/data/bind/etc +if [ ! -d /data/bind/etc ]; then + mv /etc/bind /data/bind/etc fi rm -rf /etc/bind -ln -sf /app/data/bind/etc /etc/bind +ln -sf /data/bind/etc /etc/bind -if [ ! -d /app/data/bind/lib ]; then - mkdir -p /app/data/bind/lib - chown root:bind /app/data/bind/lib +if [ ! -d /data/bind/lib ]; then + mkdir -p /data/bind/lib + chown root:bind /data/bind/lib fi rm -rf /var/lib/bind -ln -sf /app/data/bind/lib /var/lib/bind +ln -sf /data/bind/lib /var/lib/bind # create directory for webmin -mkdir -p /app/data/webmin +mkdir -p /data/webmin # populate the default webmin configuration if it does not exist -if [ ! -d /app/data/webmin/etc ]; then - mv /etc/webmin /app/data/webmin/etc +if [ ! -d /data/webmin/etc ]; then + mv /etc/webmin /data/webmin/etc fi rm -rf /etc/webmin -ln -sf /app/data/webmin/etc /etc/webmin +ln -sf /data/webmin/etc /etc/webmin /etc/init.d/webmin start