From 7397494f49e8253ebf199cb1b42487867388ab0a Mon Sep 17 00:00:00 2001 From: aptalca Date: Sat, 13 Jul 2019 23:55:29 -0400 Subject: [PATCH] Download nextcloud during build --- Dockerfile | 4 +++- Dockerfile.aarch64 | 4 +++- Dockerfile.armhf | 4 +++- README.md | 1 + readme-vars.yml | 1 + root/etc/cont-init.d/50-install | 7 +------ 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2fa2941..2dde0ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -92,7 +92,9 @@ RUN \ NEXTCLOUD_RELEASE=$(curl -s https://raw.githubusercontent.com/nextcloud/nextcloud.com/master/strings.php \ | awk -F\' '/VERSIONS_SERVER_FULL_STABLE/ {print $2;exit}'); \ fi && \ - echo ${NEXTCLOUD_RELEASE} > /version.txt && \ + echo "**** download nextcloud ****" && \ + curl -o /app/nextcloud.tar.bz2 -L \ + https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2 && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 6ac81ed..7f6e905 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -92,7 +92,9 @@ RUN \ NEXTCLOUD_RELEASE=$(curl -s https://raw.githubusercontent.com/nextcloud/nextcloud.com/master/strings.php \ | awk -F\' '/VERSIONS_SERVER_FULL_STABLE/ {print $2;exit}'); \ fi && \ - echo ${NEXTCLOUD_RELEASE} > /version.txt && \ + echo "**** download nextcloud ****" && \ + curl -o /app/nextcloud.tar.bz2 -L \ + https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2 && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index fe9fca9..fc5fe38 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -92,7 +92,9 @@ RUN \ NEXTCLOUD_RELEASE=$(curl -s https://raw.githubusercontent.com/nextcloud/nextcloud.com/master/strings.php \ | awk -F\' '/VERSIONS_SERVER_FULL_STABLE/ {print $2;exit}'); \ fi && \ - echo ${NEXTCLOUD_RELEASE} > /version.txt && \ + echo "**** download nextcloud ****" && \ + curl -o /app/nextcloud.tar.bz2 -L \ + https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2 && \ echo "**** cleanup ****" && \ apk del --purge \ build-dependencies && \ diff --git a/README.md b/README.md index 7a26ab6..404aa0b 100644 --- a/README.md +++ b/README.md @@ -191,6 +191,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **14.07.19:** - Download nextcloud during build time. * **28.06.19:** - Rebasing to alpine 3.10. * **23.03.19:** - Switching to new Base images, shift to arm32v7 tag. * **27.02.19:** - Updating base nginx config to sync up with v15 requirements. diff --git a/readme-vars.yml b/readme-vars.yml index 8667de7..082b0b6 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -58,6 +58,7 @@ app_setup_block: | # changelog changelogs: + - { date: "14.07.19:", desc: "Download nextcloud during build time." } - { date: "28.06.19:", desc: "Rebasing to alpine 3.10." } - { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." } - { date: "27.02.19:", desc: "Updating base nginx config to sync up with v15 requirements." } diff --git a/root/etc/cont-init.d/50-install b/root/etc/cont-init.d/50-install index 7e657b9..b140986 100644 --- a/root/etc/cont-init.d/50-install +++ b/root/etc/cont-init.d/50-install @@ -6,13 +6,8 @@ mkdir -p \ # install app if [ ! -e "${NEXTCLOUD_PATH}/index.php" ]; then - NEXTCLOUD_VERSION=$(cat /version.txt) - curl -o /tmp/nextcloud.tar.bz2 -L \ - https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2 - tar xf /tmp/nextcloud.tar.bz2 -C \ + tar xf /app/nextcloud.tar.bz2 -C \ "${NEXTCLOUD_PATH}" --strip-components=1 - rm -f \ - /tmp/nextcloud.tar.bz2 chown abc:abc -R \ "${NEXTCLOUD_PATH}" chmod +x "${NEXTCLOUD_PATH}/occ"