From eb99af614836d6c0a2c30fc925ecc51c9e84b0c6 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Wed, 28 Oct 2026 13:01:27 -0400 Subject: [PATCH 1/3] use vendor zip from upstream instead of composer for php deps --- Dockerfile | 12 ++++++++++-- Dockerfile.aarch64 | 12 ++++++++++-- README.md | 1 + readme-vars.yml | 1 + 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6b2a25f..111aec6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,8 +44,16 @@ RUN \ tar xf \ /tmp/bookstack.tar.gz -C \ /app/www/ --strip-components=1 && \ - echo "**** install composer dependencies ****" && \ - composer install -d /app/www/ && \ + echo "**** install php dependencies ****" && \ + curl -fo \ + /tmp/bookstack-vendor.zip -L \ + "https://files.bookstackapp.com/vendor/${BOOKSTACK_RELEASE}.zip" && \ + if [ "$(sha256sum /tmp/bookstack-vendor.zip | awk -F ' ' '{print $1}')" == "$(cat /app/www/dev/checksums/vendor)" ]; then \ + unzip -d /app/www/ /tmp/bookstack-vendor.zip; \ + else \ + echo "Vendor zip checksum did not match, canceling build."; \ + exit 1; \ + fi && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** create symlinks ****" && \ /bin/bash -c \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 2623dce..58516e1 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -44,8 +44,16 @@ RUN \ tar xf \ /tmp/bookstack.tar.gz -C \ /app/www/ --strip-components=1 && \ - echo "**** install composer dependencies ****" && \ - composer install -d /app/www/ && \ + echo "**** install php dependencies ****" && \ + curl -fo \ + /tmp/bookstack-vendor.zip -L \ + "https://files.bookstackapp.com/vendor/${BOOKSTACK_RELEASE}.zip" && \ + if [ "$(sha256sum /tmp/bookstack-vendor.zip | awk -F ' ' '{print $1}')" == "$(cat /app/www/dev/checksums/vendor)" ]; then \ + unzip -d /app/www/ /tmp/bookstack-vendor.zip; \ + else \ + echo "Vendor zip checksum did not match, canceling build."; \ + exit 1; \ + fi && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** create symlinks ****" && \ /bin/bash -c \ diff --git a/README.md b/README.md index 419259d..d638a9f 100644 --- a/README.md +++ b/README.md @@ -343,6 +343,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **28.10.26:** - Use vendor zip from upstream instead of composer for php deps. * **05.08.26:** - Run the async queue worker as the PUID/PGID-managed abc user. * **05.07.26:** - Rebase to Alpine 3.24. * **29.04.26:** - Switch to pulling releases from [Codeberg](https://codeberg.org/bookstack/bookstack). diff --git a/readme-vars.yml b/readme-vars.yml index b248ebd..53db049 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -136,6 +136,7 @@ init_diagram: | "bookstack:latest" <- Base Images # changelog changelogs: + - {date: "28.10.26:", desc: "Use vendor zip from upstream instead of composer for php deps."} - {date: "05.08.26:", desc: "Run the async queue worker as the PUID/PGID-managed abc user."} - {date: "05.07.26:", desc: "Rebase to Alpine 3.24."} - {date: "29.04.26:", desc: "Switch to pulling releases from [Codeberg](https://codeberg.org/bookstack/bookstack)."} From 284aa05aa336cfd310c6e769b5ff741fb9f3afe4 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Wed, 28 Oct 2026 13:07:09 -0400 Subject: [PATCH 2/3] fall back to composer if curl fails or checksum doesn't match --- Dockerfile | 6 +++--- Dockerfile.aarch64 | 6 +++--- README.md | 2 +- readme-vars.yml | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 111aec6..801f563 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,14 +45,14 @@ RUN \ /tmp/bookstack.tar.gz -C \ /app/www/ --strip-components=1 && \ echo "**** install php dependencies ****" && \ - curl -fo \ + curl -o \ /tmp/bookstack-vendor.zip -L \ "https://files.bookstackapp.com/vendor/${BOOKSTACK_RELEASE}.zip" && \ if [ "$(sha256sum /tmp/bookstack-vendor.zip | awk -F ' ' '{print $1}')" == "$(cat /app/www/dev/checksums/vendor)" ]; then \ unzip -d /app/www/ /tmp/bookstack-vendor.zip; \ else \ - echo "Vendor zip checksum did not match, canceling build."; \ - exit 1; \ + echo "Vendor zip checksum did not match, falling back to composer."; \ + composer install -d /app/www/ --nodev; \ fi && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** create symlinks ****" && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 58516e1..753af0d 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -45,14 +45,14 @@ RUN \ /tmp/bookstack.tar.gz -C \ /app/www/ --strip-components=1 && \ echo "**** install php dependencies ****" && \ - curl -fo \ + curl -o \ /tmp/bookstack-vendor.zip -L \ "https://files.bookstackapp.com/vendor/${BOOKSTACK_RELEASE}.zip" && \ if [ "$(sha256sum /tmp/bookstack-vendor.zip | awk -F ' ' '{print $1}')" == "$(cat /app/www/dev/checksums/vendor)" ]; then \ unzip -d /app/www/ /tmp/bookstack-vendor.zip; \ else \ - echo "Vendor zip checksum did not match, canceling build."; \ - exit 1; \ + echo "Vendor zip checksum did not match, falling back to composer."; \ + composer install -d /app/www/ --nodev; \ fi && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** create symlinks ****" && \ diff --git a/README.md b/README.md index d638a9f..29abaeb 100644 --- a/README.md +++ b/README.md @@ -343,7 +343,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions -* **28.10.26:** - Use vendor zip from upstream instead of composer for php deps. +* **28.10.26:** - Use vendor zip from upstream instead of composer for php deps, with fallback to composer if it fails. * **05.08.26:** - Run the async queue worker as the PUID/PGID-managed abc user. * **05.07.26:** - Rebase to Alpine 3.24. * **29.04.26:** - Switch to pulling releases from [Codeberg](https://codeberg.org/bookstack/bookstack). diff --git a/readme-vars.yml b/readme-vars.yml index 53db049..0b87509 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -136,7 +136,7 @@ init_diagram: | "bookstack:latest" <- Base Images # changelog changelogs: - - {date: "28.10.26:", desc: "Use vendor zip from upstream instead of composer for php deps."} + - {date: "28.10.26:", desc: "Use vendor zip from upstream instead of composer for php deps, with fallback to composer if it fails."} - {date: "05.08.26:", desc: "Run the async queue worker as the PUID/PGID-managed abc user."} - {date: "05.07.26:", desc: "Rebase to Alpine 3.24."} - {date: "29.04.26:", desc: "Switch to pulling releases from [Codeberg](https://codeberg.org/bookstack/bookstack)."} From 064f50d94cd62a09b218c216c626f0223cc8e148 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Wed, 28 Oct 2026 13:13:30 -0400 Subject: [PATCH 3/3] typo --- Dockerfile | 2 +- Dockerfile.aarch64 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 801f563..6dfaaa5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,7 +52,7 @@ RUN \ unzip -d /app/www/ /tmp/bookstack-vendor.zip; \ else \ echo "Vendor zip checksum did not match, falling back to composer."; \ - composer install -d /app/www/ --nodev; \ + composer install -d /app/www/ --no-dev; \ fi && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** create symlinks ****" && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 753af0d..fb0cfbb 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -52,7 +52,7 @@ RUN \ unzip -d /app/www/ /tmp/bookstack-vendor.zip; \ else \ echo "Vendor zip checksum did not match, falling back to composer."; \ - composer install -d /app/www/ --nodev; \ + composer install -d /app/www/ --no-dev; \ fi && \ printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** create symlinks ****" && \