diff options
author | nachoparker <nacho@ownyourbits.com> | 2018-12-10 04:08:33 +0300 |
---|---|---|
committer | nachoparker <nacho@ownyourbits.com> | 2019-01-05 04:14:52 +0300 |
commit | d5c1f0058b43c22ebb132f51df0ea144fbd927ec (patch) | |
tree | b826d4fefb22afc2513a57e9464a486b9fd24dcc /docker | |
parent | 21fee19452410817d26b6caebd0a91b5968b0a44 (diff) |
rework to use JSON based cfg and more
Diffstat (limited to 'docker')
-rw-r--r-- | docker/lamp/Dockerfile | 2 | ||||
-rw-r--r-- | docker/nextcloud/Dockerfile | 11 | ||||
-rw-r--r-- | docker/nextcloudpi/Dockerfile | 14 |
3 files changed, 15 insertions, 12 deletions
diff --git a/docker/lamp/Dockerfile b/docker/lamp/Dockerfile index 2736b11f..b92b1435 100644 --- a/docker/lamp/Dockerfile +++ b/docker/lamp/Dockerfile @@ -13,7 +13,7 @@ RUN \ # installation source /usr/local/etc/library.sh; \ set +x; \ -install_script /usr/local/etc/lamp.sh; \ +install_app /usr/local/etc/lamp.sh; \ # stop mysqld mysqladmin -u root shutdown; \ diff --git a/docker/nextcloud/Dockerfile b/docker/nextcloud/Dockerfile index a9c71f76..49f1675d 100644 --- a/docker/nextcloud/Dockerfile +++ b/docker/nextcloud/Dockerfile @@ -7,7 +7,8 @@ SHELL ["/bin/bash", "-c"] ENV DOCKERBUILD 1 COPY etc/library.sh /usr/local/etc/ -COPY etc/ncp-config.d/nc-init.sh etc/ncp-config.d/nc-nextcloud.sh / +COPY bin/ncp/CONFIG/nc-nextcloud.sh / +COPY etc/ncp-config.d/nc-nextcloud.cfg /usr/local/etc/ncp-config.d/ RUN \ @@ -16,11 +17,11 @@ touch /.ncp-image; \ # installation ( /var/www/nextcloud -> /data/app which will be in a volume ) apt-get update; \ -apt-get install --no-install-recommends -y wget ca-certificates sudo; \ +apt-get install --no-install-recommends -y wget ca-certificates sudo jq; \ source /usr/local/etc/library.sh; \ set +x; \ -install_script /nc-nextcloud.sh; \ -activate_script /nc-nextcloud.sh; \ +install_app /nc-nextcloud.sh; \ +run_app_unsafe /nc-nextcloud.sh; \ mv /var/www/nextcloud /data-ro/app; \ ln -s /data-ro/app /var/www/nextcloud; \ @@ -38,7 +39,7 @@ rm -f /var/log/alternatives.log /var/log/apt/*; \ # specific cleanup apt-get purge -y wget ca-certificates; \ -rm /nc-nextcloud.sh; \ +rm /nc-nextcloud.sh /usr/local/etc/ncp-config.d/nc-nextcloud.cfg; \ rm /.ncp-image; COPY docker-common/nextcloud/020nextcloud /etc/services-enabled.d/ diff --git a/docker/nextcloudpi/Dockerfile b/docker/nextcloudpi/Dockerfile index 1458cd9d..0583ebc4 100644 --- a/docker/nextcloudpi/Dockerfile +++ b/docker/nextcloudpi/Dockerfile @@ -7,7 +7,7 @@ SHELL ["/bin/bash", "-c"] ENV DOCKERBUILD 1 RUN mkdir -p /tmp/ncp-build -COPY bin/* /tmp/ncp-build/bin/ +COPY bin/ /tmp/ncp-build/bin/ COPY etc /tmp/ncp-build/etc/ COPY ncp.sh update.sh /tmp/ncp-build/ COPY ncp-web /tmp/ncp-build/ncp-web/ @@ -31,19 +31,18 @@ apt-get install --no-install-recommends -y wget ca-certificates; \ source /usr/local/etc/library.sh; \ set +x; \ cd /tmp/ncp-build/; \ -install_script ncp.sh; \ +install_app ncp.sh; \ # fix default paths -sed -i 's|/media/USBdrive|/data/backups|' /usr/local/etc/ncp-config.d/nc-backup.sh; \ +sed -i 's|/media/USBdrive|/data/backups|' /usr/local/etc/ncp-config.d/nc-backup.cfg; \ # specific cleanup -rm -r /tmp/ncp-build; \ +cd /; rm -r /tmp/ncp-build; \ rm /.ncp-image; \ # cleanup all NCP extras source /usr/local/etc/library.sh; \ -cd /usr/local/etc/ncp-config.d/; \ -for script in *.sh; do cleanup_script $script; done; \ +find /usr/local/bin/ncp -name '*.sh' | while read l; do cleanup_script $l; done; \ # should be cleaned up in no-ip.sh, but breaks udiskie. # safe to do it here since no automount in docker @@ -60,6 +59,9 @@ rm -f /var/log/alternatives.log /var/log/apt/*; \ rm /var/cache/debconf/*-old; COPY docker-common/nextcloudpi/000ncp /etc/services-enabled.d/ +COPY bin/ncp/CONFIG/nc-init.sh / +COPY etc/ncp-config.d/nc-init.cfg /usr/local/etc/ncp-config.d/ + # 4443 - ncp-web EXPOSE 80 443 4443 |