From 3b36dd37527076a56c9812c1cfb0950093ce1d19 Mon Sep 17 00:00:00 2001 From: nachoparker Date: Sat, 11 May 2019 12:13:19 -0600 Subject: [PATCH] build: refactor docker builds Signed-off-by: nachoparker --- Makefile | 48 ------------- README.md | 7 +- batch.sh | 51 +++++++++++--- bin/ncp/BACKUPS/nc-rsync.sh | 2 +- build-docker.sh | 48 +++++++++++++ docker-armhf/debian-ncp/Dockerfile | 11 --- docker-armhf/lamp/Dockerfile | 43 ------------ docker-armhf/nextcloud/Dockerfile | 52 -------------- docker-armhf/nextcloudpi/Dockerfile | 69 ------------------- docker/debian-ncp/Dockerfile | 16 ++++- .../debian-ncp/run-parts.sh | 0 {docker-common => docker}/lamp/010lamp | 0 docker/lamp/Dockerfile | 12 ++-- .../nextcloud/020nextcloud | 0 docker/nextcloud/Dockerfile | 14 ++-- .../nextcloud/ncp-wait-msg.html | 0 {docker-common => docker}/nextcloudpi/000ncp | 0 docker/nextcloudpi/Dockerfile | 15 ++-- lamp.sh | 1 + update.sh | 2 +- 20 files changed, 138 insertions(+), 253 deletions(-) delete mode 100644 Makefile create mode 100755 build-docker.sh delete mode 100644 docker-armhf/debian-ncp/Dockerfile delete mode 100644 docker-armhf/lamp/Dockerfile delete mode 100644 docker-armhf/nextcloud/Dockerfile delete mode 100644 docker-armhf/nextcloudpi/Dockerfile rename {docker-common => docker}/debian-ncp/run-parts.sh (100%) rename {docker-common => docker}/lamp/010lamp (100%) rename {docker-common => docker}/nextcloud/020nextcloud (100%) rename {docker-common => docker}/nextcloud/ncp-wait-msg.html (100%) rename {docker-common => docker}/nextcloudpi/000ncp (100%) diff --git a/Makefile b/Makefile deleted file mode 100644 index c28ad4f60..000000000 --- a/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# Batch-build docker container layers for NextCloudPi -# -# Copyleft 2017 by Ignacio Nunez Hernanz -# GPL licensed (see end of file) * Use at your own risk! -# - - -nextcloudpi-armhf: nextcloud-armhf - docker build . -f docker-armhf/nextcloudpi/Dockerfile -t ownyourbits/nextcloudpi-armhf:latest - -nextcloud-armhf: lamp-armhf - docker build . -f docker-armhf/nextcloud/Dockerfile -t ownyourbits/nextcloud-armhf:latest - -lamp-armhf: debian-ncp-armhf - docker build . -f docker-armhf/lamp/Dockerfile -t ownyourbits/lamp-armhf:latest - -debian-ncp-armhf: - docker build --pull . -f docker-armhf/debian-ncp/Dockerfile -t ownyourbits/debian-ncp-armhf:latest - - -nextcloudpi-x86: nextcloud-x86 - docker build . -f docker/nextcloudpi/Dockerfile -t ownyourbits/nextcloudpi-x86:latest - -nextcloud-x86: lamp-x86 - docker build . -f docker/nextcloud/Dockerfile -t ownyourbits/nextcloud-x86:latest - -lamp-x86: debian-ncp-x86 - docker build . -f docker/lamp/Dockerfile -t ownyourbits/lamp-x86:latest - -debian-ncp-x86: - docker build --pull . -f docker/debian-ncp/Dockerfile -t ownyourbits/debian-ncp-x86:latest - -# License -# -# This script is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This script is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this script; if not, write to the -# Free Software Foundation, Inc., 59 Temple Place, Suite 330, -# Boston, MA 02111-1307 USA diff --git a/README.md b/README.md index 6b32d91ec..c11184292 100644 --- a/README.md +++ b/README.md @@ -102,8 +102,9 @@ In order to generate the Docker images ``` git clone https://github.com/nextcloud/nextcloudpi.git cd nextcloudpi -make # armhf version -make nextcloudpi-x86 # x86 version +./build-docker.sh x86 +./build-docker.sh armhf +./build-docker.sh arm64 ``` NextCloudPi can be installed in any architecture running the latest Debian @@ -126,6 +127,8 @@ https://hub.docker.com/r/ownyourbits/nextcloudpi-x86 https://hub.docker.com/r/ownyourbits/nextcloudpi-armhf +https://hub.docker.com/r/ownyourbits/nextcloudpi-arm64 + ## Contact You can find us in the [forums](https://help.nextcloud.com/c/support/appliances-docker-snappy-vm) and a [Telegram group](https://t.me/NextCloudPi) diff --git a/batch.sh b/batch.sh index 16efceda5..63cc55910 100755 --- a/batch.sh +++ b/batch.sh @@ -1,5 +1,4 @@ #!/bin/bash - # Batch creation of NextCloudPi images and containers # # Copyleft 2017 by Ignacio Nunez Hernanz @@ -10,6 +9,9 @@ set -e +version=$(git describe --tags --always) +version=${version%-*-*} + ## BUILDING source buildlib.sh # initializes $IMGNAME @@ -33,28 +35,61 @@ IMG="$( ls -1t tmp/*.img | head -1 )" # VM ./build-VM.sh -# Docker x86 -make nextcloudpi-x86 +# Docker +./build-docker.sh x86 +./build-docker.sh armhf +./build-docker.sh arm64 + +[[ "$FTPPASS" == "" ]] && exit + +export DOCKER_CLI_EXPERIMENTAL=enabled # TODO test first #&& { docker push ownyourbits/nextcloudpi-x86 + docker push ownyourbits/nextcloudpi-x86:${version} docker push ownyourbits/nextcloud-x86 + docker push ownyourbits/nextcloud-x86 :${version} docker push ownyourbits/lamp-x86 + docker push ownyourbits/lamp-x86:${version} docker push ownyourbits/debian-ncp-x86 + docker push ownyourbits/debian-ncp-x86:${version} #} -# Docker armhf -cp -n /usr/bin/qemu-arm-static docker-armhf && \ -make nextcloudpi-armhf - # TODO test first && { docker push ownyourbits/nextcloudpi-armhf + docker push ownyourbits/nextcloudpi-armhf:${version} docker push ownyourbits/nextcloud-armhf + docker push ownyourbits/nextcloud-armhf:${version} docker push ownyourbits/lamp-armhf + docker push ownyourbits/lamp-armhf:${version} docker push ownyourbits/debian-ncp-armhf + docker push ownyourbits/debian-ncp-armhf:${version} +#} + +# TODO test first && { + docker push ownyourbits/nextcloudpi-arm64 + docker push ownyourbits/nextcloudpi-arm64:${version} + docker push ownyourbits/nextcloud-arm64 + docker push ownyourbits/nextcloud-arm64:${version} + docker push ownyourbits/lamp-arm64 + docker push ownyourbits/lamp-arm64:${version} + docker push ownyourbits/debian-ncp-arm64 + docker push ownyourbits/debian-ncp-arm64:${version} #} -rm -f docker-armhf/qemu-arm-static + +# Docker multi-arch +docker manifest create --amend ownyourbits/nextcloudpi \ + ownyourbits/nextcloudpi-x86 \ + ownyourbits/nextcloudpi-armhf \ + ownyourbits/nextcloudpi-arm64 + + +docker manifest annotate ownyourbits/nextcloudpi ownyourbits/nextcloudpi-x86 --os linux --arch amd64 +docker manifest annotate ownyourbits/nextcloudpi ownyourbits/nextcloudpi-armhf --os linux --arch arm +docker manifest annotate ownyourbits/nextcloudpi ownyourbits/nextcloudpi-arm64 --os linux --arch arm64v8 + +docker manifest push -p ownyourbits/nextcloudpi # License # diff --git a/bin/ncp/BACKUPS/nc-rsync.sh b/bin/ncp/BACKUPS/nc-rsync.sh index 8be5addf0..6756f2d00 100644 --- a/bin/ncp/BACKUPS/nc-rsync.sh +++ b/bin/ncp/BACKUPS/nc-rsync.sh @@ -13,7 +13,7 @@ BASEDIR=/var/www install() { apt-get update - apt-get install --no-install-recommends -y rsync + apt-get install --no-install-recommends -y rsync openssh-client } configure() diff --git a/build-docker.sh b/build-docker.sh new file mode 100755 index 000000000..7b34d96cc --- /dev/null +++ b/build-docker.sh @@ -0,0 +1,48 @@ +# Batch-build docker container layers for NextCloudPi +# +# Copyleft 2017 by Ignacio Nunez Hernanz +# GPL licensed (see end of file) * Use at your own risk! +# + +set -e + +version=$(git describe --tags --always) +version=${version%-*-*} + +function docker_build() { DOCKER_BUILDKIT=1 docker build --progress=plain . "$@"; } + +function build_arch() +{ + local arch="${1}" + local arch_qemu="${2}" + local ncp_tag="${3:-arch}" + + docker_build -f docker/debian-ncp/Dockerfile -t ownyourbits/debian-ncp-${arch}:latest --pull --build-arg arch=${arch} --build-arg arch_qemu=${arch_qemu} + docker_build -f docker/lamp/Dockerfile -t ownyourbits/lamp-${arch}:latest --build-arg arch=${arch} + docker_build -f docker/nextcloud/Dockerfile -t ownyourbits/nextcloud-${arch}:latest --build-arg arch=${arch} + docker_build -f docker/nextcloudpi/Dockerfile -t ownyourbits/nextcloudpi-${arch}:latest --build-arg arch=${arch} + + docker tag ownyourbits/nextcloudpi-${arch}:latest ownyourbits/nextcloudpi-${ncp_tag}:"${version}" +} + +[[ "$@" =~ "x86" ]] && build_arch amd64 x86_64 x86 +[[ "$@" =~ "armhf" ]] && build_arch armhf arm +[[ "$@" =~ "arm64" ]] && build_arch arm64v8 aarch64 arm64 + + +# License +# +# This script is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This script is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this script; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place, Suite 330, +# Boston, MA 02111-1307 USA diff --git a/docker-armhf/debian-ncp/Dockerfile b/docker-armhf/debian-ncp/Dockerfile deleted file mode 100644 index a4179cd44..000000000 --- a/docker-armhf/debian-ncp/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM arm32v7/debian:stretch-slim - -MAINTAINER Ignacio Núñez Hernanz - -CMD /bin/bash - -COPY docker-armhf/qemu-arm-static /usr/bin - -RUN mkdir -p /etc/services-available.d /etc/services-enabled.d - -COPY docker-common/debian-ncp/run-parts.sh / diff --git a/docker-armhf/lamp/Dockerfile b/docker-armhf/lamp/Dockerfile deleted file mode 100644 index bc3b68fec..000000000 --- a/docker-armhf/lamp/Dockerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM ownyourbits/debian-ncp-armhf - -MAINTAINER Ignacio Núñez Hernanz - -SHELL ["/bin/bash", "-c"] - -ENV DOCKERBUILD 1 - -COPY etc/library.sh lamp.sh /usr/local/etc/ - -RUN \ - -# installation -source /usr/local/etc/library.sh; \ -set +x; \ -install_app /usr/local/etc/lamp.sh; \ - -# stop mysqld -mysqladmin -u root shutdown; \ - -# mariaDB fixups (move database to /data-ro, which will be in a persistent volume) -mkdir -p /data-ro /data; \ -mv /var/lib/mysql /data-ro/database; \ -sed -i "s|^datadir.*|datadir = /data-ro/database|" /etc/mysql/mariadb.conf.d/90-ncp.cnf; \ - -# package cleanup -apt-get autoremove -y; \ -apt-get clean; \ -find /var/lib/apt/lists -type f | xargs rm; \ -rm -rf /usr/share/man/*; \ -rm -rf /usr/share/doc/*; \ -rm /var/cache/debconf/*-old; \ -rm -f /var/log/alternatives.log /var/log/apt/*; \ - -# specific cleanup -rm /data-ro/database/ib_logfile*; \ -rm /usr/local/etc/lamp.sh - -COPY docker-common/lamp/010lamp /etc/services-enabled.d/ - -ENTRYPOINT ["/run-parts.sh"] - -EXPOSE 80 443 diff --git a/docker-armhf/nextcloud/Dockerfile b/docker-armhf/nextcloud/Dockerfile deleted file mode 100644 index 6e3b551ef..000000000 --- a/docker-armhf/nextcloud/Dockerfile +++ /dev/null @@ -1,52 +0,0 @@ -FROM ownyourbits/lamp-armhf - -MAINTAINER Ignacio Núñez Hernanz - -SHELL ["/bin/bash", "-c"] - -ENV DOCKERBUILD 1 - -COPY etc/library.sh /usr/local/etc/ -COPY bin/ncp/CONFIG/nc-nextcloud.sh / -COPY etc/ncp-config.d/nc-nextcloud.cfg /usr/local/etc/ncp-config.d/ - -RUN \ - -# mark as image build -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 jq; \ -source /usr/local/etc/library.sh; \ -set +x; \ -install_app /nc-nextcloud.sh; \ -run_app_unsafe /nc-nextcloud.sh; \ -mv /var/www/nextcloud /data-ro/nextcloud; \ -ln -s /data-ro/nextcloud /var/www/nextcloud; \ - -# stop mysqld -mysqladmin -u root shutdown; \ - -# package cleanup -apt-get autoremove -y; \ -apt-get clean; \ -find /var/lib/apt/lists -type f | xargs rm; \ -rm -rf /usr/share/man/*; \ -rm -rf /usr/share/doc/*; \ -rm /var/cache/debconf/*-old; \ -rm -f /var/log/alternatives.log /var/log/apt/*; \ - -# specific cleanup -apt-get purge -y wget ca-certificates; \ -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/ -COPY bin/ncp-provisioning.sh /usr/local/bin/ - -# display message until first run initialization is complete -COPY docker-common/nextcloud/ncp-wait-msg.html /data-ro/nextcloud -RUN \ -mv /data-ro/nextcloud/index.php /; \ -mv /data-ro/nextcloud/ncp-wait-msg.html /data-ro/nextcloud/index.php; diff --git a/docker-armhf/nextcloudpi/Dockerfile b/docker-armhf/nextcloudpi/Dockerfile deleted file mode 100644 index f2da9f88d..000000000 --- a/docker-armhf/nextcloudpi/Dockerfile +++ /dev/null @@ -1,69 +0,0 @@ -FROM ownyourbits/nextcloud-armhf - -MAINTAINER Ignacio Núñez Hernanz - -SHELL ["/bin/bash", "-c"] - -ENV DOCKERBUILD 1 - -RUN mkdir -p /tmp/ncp-build -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/ -COPY ncp-app /tmp/ncp-build/ncp-app/ -COPY docker-common /tmp/ncp-build/docker-common/ - -RUN \ - -# make sure we don't accidentally disable first run wizard -rm -f ncp-web/{wizard.cfg,ncp-web.cfg}; \ - -# mark as image build -touch /.ncp-image; \ - -# mark as docker image -touch /.docker-image; \ - -apt-get update; \ -apt-get install --no-install-recommends -y wget ca-certificates; \ - -# install nextcloudpi -source /usr/local/etc/library.sh; \ -set +x; \ -cd /tmp/ncp-build/; \ -install_app ncp.sh; \ - -# fix default paths -sed -i 's|/media/USBdrive|/data/backups|' /usr/local/etc/ncp-config.d/nc-backup.cfg; \ -sed -i 's|/media/USBdrive|/data/backups|' /usr/local/etc/ncp-config.d/nc-backup-auto.cfg; \ - -# specific cleanup -cd /; rm -r /tmp/ncp-build; \ -rm /.ncp-image; \ - -# cleanup all NCP extras -source /usr/local/etc/library.sh; \ -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 -apt-get purge -y make gcc libc-dev; \ - -# package clean up -apt-get autoremove -y; \ -apt-get clean; \ -find /var/lib/apt/lists -type f | xargs rm; \ -find /var/log -type f -exec rm {} \; ; \ -rm -rf /usr/share/man/*; \ -rm -rf /usr/share/doc/*; \ -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 diff --git a/docker/debian-ncp/Dockerfile b/docker/debian-ncp/Dockerfile index 0345eb45c..3d4e68bf9 100644 --- a/docker/debian-ncp/Dockerfile +++ b/docker/debian-ncp/Dockerfile @@ -1,9 +1,19 @@ -FROM debian:stretch-slim +ARG arch=armhf +ARG arch_qemu=arm +FROM debian:stretch-slim AS qemu -MAINTAINER Ignacio Núñez Hernanz +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends qemu-user-static + +FROM ${arch}/debian:stretch-slim + +ARG arch_qemu + +LABEL maintainer="Ignacio Núñez Hernanz " CMD /bin/bash +COPY --from=qemu /usr/bin/qemu-${arch_qemu}-static /usr/bin/ + RUN mkdir -p /etc/services-available.d /etc/services-enabled.d -COPY docker-common/debian-ncp/run-parts.sh / +COPY docker/debian-ncp/run-parts.sh / diff --git a/docker-common/debian-ncp/run-parts.sh b/docker/debian-ncp/run-parts.sh similarity index 100% rename from docker-common/debian-ncp/run-parts.sh rename to docker/debian-ncp/run-parts.sh diff --git a/docker-common/lamp/010lamp b/docker/lamp/010lamp similarity index 100% rename from docker-common/lamp/010lamp rename to docker/lamp/010lamp diff --git a/docker/lamp/Dockerfile b/docker/lamp/Dockerfile index b92b14350..c0b9276f8 100644 --- a/docker/lamp/Dockerfile +++ b/docker/lamp/Dockerfile @@ -1,6 +1,10 @@ -FROM ownyourbits/debian-ncp-x86 +# syntax=docker/dockerfile:experimental -MAINTAINER Ignacio Núñez Hernanz +ARG arch=armhf + +FROM ownyourbits/debian-ncp-${arch} + +LABEL maintainer="Ignacio Núñez Hernanz " SHELL ["/bin/bash", "-c"] @@ -8,7 +12,7 @@ ENV DOCKERBUILD 1 COPY etc/library.sh lamp.sh /usr/local/etc/ -RUN \ +RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \ # installation source /usr/local/etc/library.sh; \ @@ -36,7 +40,7 @@ rm -f /var/log/alternatives.log /var/log/apt/*; \ rm /data-ro/database/ib_logfile*; \ rm /usr/local/etc/lamp.sh -COPY docker-common/lamp/010lamp /etc/services-enabled.d/ +COPY docker/lamp/010lamp /etc/services-enabled.d/ ENTRYPOINT ["/run-parts.sh"] diff --git a/docker-common/nextcloud/020nextcloud b/docker/nextcloud/020nextcloud similarity index 100% rename from docker-common/nextcloud/020nextcloud rename to docker/nextcloud/020nextcloud diff --git a/docker/nextcloud/Dockerfile b/docker/nextcloud/Dockerfile index 688cba32f..bd27aec4f 100644 --- a/docker/nextcloud/Dockerfile +++ b/docker/nextcloud/Dockerfile @@ -1,6 +1,10 @@ -FROM ownyourbits/lamp-x86 +# syntax=docker/dockerfile:experimental -MAINTAINER Ignacio Núñez Hernanz +ARG arch=armhf + +FROM ownyourbits/lamp-${arch} + +LABEL maintainer="Ignacio Núñez Hernanz " SHELL ["/bin/bash", "-c"] @@ -10,7 +14,7 @@ COPY etc/library.sh /usr/local/etc/ COPY bin/ncp/CONFIG/nc-nextcloud.sh / COPY etc/ncp-config.d/nc-nextcloud.cfg /usr/local/etc/ncp-config.d/ -RUN \ +RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \ # mark as image build touch /.ncp-image; \ @@ -42,11 +46,11 @@ apt-get purge -y wget ca-certificates; \ 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/ +COPY docker/nextcloud/020nextcloud /etc/services-enabled.d/ COPY bin/ncp-provisioning.sh /usr/local/bin/ # display message until first run initialization is complete -COPY docker-common/nextcloud/ncp-wait-msg.html /data-ro/nextcloud +COPY docker/nextcloud/ncp-wait-msg.html /data-ro/nextcloud RUN \ mv /data-ro/nextcloud/index.php /; \ mv /data-ro/nextcloud/ncp-wait-msg.html /data-ro/nextcloud/index.php; diff --git a/docker-common/nextcloud/ncp-wait-msg.html b/docker/nextcloud/ncp-wait-msg.html similarity index 100% rename from docker-common/nextcloud/ncp-wait-msg.html rename to docker/nextcloud/ncp-wait-msg.html diff --git a/docker-common/nextcloudpi/000ncp b/docker/nextcloudpi/000ncp similarity index 100% rename from docker-common/nextcloudpi/000ncp rename to docker/nextcloudpi/000ncp diff --git a/docker/nextcloudpi/Dockerfile b/docker/nextcloudpi/Dockerfile index 2cfdc4e19..6ff91bb37 100644 --- a/docker/nextcloudpi/Dockerfile +++ b/docker/nextcloudpi/Dockerfile @@ -1,6 +1,10 @@ -FROM ownyourbits/nextcloud-x86 +# syntax=docker/dockerfile:experimental -MAINTAINER Ignacio Núñez Hernanz +ARG arch=armhf + +FROM ownyourbits/nextcloud-${arch} + +LABEL maintainer="Ignacio Núñez Hernanz " SHELL ["/bin/bash", "-c"] @@ -12,9 +16,9 @@ COPY etc /tmp/ncp-build/etc/ COPY ncp.sh update.sh /tmp/ncp-build/ COPY ncp-web /tmp/ncp-build/ncp-web/ COPY ncp-app /tmp/ncp-build/ncp-app/ -COPY docker-common /tmp/ncp-build/docker-common/ +COPY docker /tmp/ncp-build/docker/ -RUN \ +RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \ # make sure we don't accidentally disable first run wizard rm -f ncp-web/{wizard.cfg,ncp-web.cfg}; \ @@ -60,10 +64,9 @@ rm -rf /usr/share/doc/*; \ rm -f /var/log/alternatives.log /var/log/apt/*; \ rm /var/cache/debconf/*-old; -COPY docker-common/nextcloudpi/000ncp /etc/services-enabled.d/ +COPY docker/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 diff --git a/lamp.sh b/lamp.sh index 239038b19..8f26db879 100644 --- a/lamp.sh +++ b/lamp.sh @@ -33,6 +33,7 @@ install() $APTINSTALL apt-transport-https gnupg2 wget ca-certificates echo "deb https://packages.sury.org/php/ stretch main" > /etc/apt/sources.list.d/php.list wget -q https://packages.sury.org/php/apt.gpg -O- | apt-key add - + wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg # INSTALL ########################################## diff --git a/update.sh b/update.sh index d699dbffc..9d0d476c8 100755 --- a/update.sh +++ b/update.sh @@ -119,7 +119,7 @@ cp -r ncp-app /var/www/ done # update services - cp docker-common/{lamp/010lamp,nextcloud/020nextcloud,nextcloudpi/000ncp} /etc/services-enabled.d + cp docker/{lamp/010lamp,nextcloud/020nextcloud,nextcloudpi/000ncp} /etc/services-enabled.d }