From b71ecb4f3426cbb3ac9be2d334acb03c936cded0 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Wed, 12 Jul 2017 21:25:50 +0200 Subject: [PATCH] Fix paths in scripts --- owncloud/Dockerfile | 10 ++++++++++ owncloud/run.sh | 9 ++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/owncloud/Dockerfile b/owncloud/Dockerfile index b1749f7..4740138 100644 --- a/owncloud/Dockerfile +++ b/owncloud/Dockerfile @@ -35,6 +35,16 @@ RUN rm /var/www/owncloud-${OWNCLOUD_VER}.tar.bz2 \ /var/www/owncloud/.user.ini RUN rmdir /var/www/owncloud +# Provision data +RUN mkdir -p /provision/owncloud +RUN cp -r /var/www/apps /provision/owncloud +RUN cp -r /var/www/config /provision/owncloud +RUN rm -rf /var/www/apps \ + /var/www/config +RUN ln -s /data/owncloud/config /var/www +RUN ln -s /data/owncloud/apps /var/www +RUN ln -s /data/owncloud/data /var/www + EXPOSE 80 VOLUME ["/data"] diff --git a/owncloud/run.sh b/owncloud/run.sh index b1e3716..9144504 100755 --- a/owncloud/run.sh +++ b/owncloud/run.sh @@ -8,14 +8,9 @@ function first_run() { /data/owncloud/data \ /data/nginx-log - cp -r /var/www/apps /data/owncloud - cp -r /var/www/config /data/owncloud + cp -r /provision/owncloud/apps /data/owncloud + cp -r /provision/owncloud/config /data/owncloud cp -r /var/lib/mysql /data - rm -rf /var/www/apps \ - /var/www/config - ln -s /data/owncloud/config /var/www - ln -s /data/owncloud/apps /var/www - ln -s /data/owncloud/data /var/www chown -R www-data:www-data /data/owncloud /var/www chown -R mysql:mysql /data/mysql