From 741f3d8e91c39cf45707e96a852abc006eb418c1 Mon Sep 17 00:00:00 2001 From: Austin Burdine Date: Thu, 10 Sep 2026 07:10:28 -0400 Subject: [PATCH] Dropped armv7 support in next variant no ref - we'll want to drop armv7 support in Ghost 7 due to pnpm 12 not supporting it, so we'll update the next variant to match --- 6-next/alpine3.23/Dockerfile | 16 ++-------------- 6-next/bookworm/Dockerfile | 27 ++++----------------------- Dockerfile-next.template | 25 +++---------------------- versions.json | 10 ++-------- versions.sh | 15 ++++++++++----- 5 files changed, 21 insertions(+), 72 deletions(-) diff --git a/6-next/alpine3.23/Dockerfile b/6-next/alpine3.23/Dockerfile index 59e3961b..40e0bcf7 100644 --- a/6-next/alpine3.23/Dockerfile +++ b/6-next/alpine3.23/Dockerfile @@ -50,20 +50,8 @@ ENV GHOST_TARBALL=https://github.com/TryGhost/Ghost/releases/download/v6.63.0/gh ENV GHOST_SHA256=20b2ac6e936299d5b88b37d2a7175712ad35e6ade78a594ab6d495256ab54292 RUN set -eux; \ -# Ghost pins its pnpm by hash in "packageManager", so corepack fetches exactly that one -- except on -# arm32v7, where pnpm 12 is a Rust binary with no 32-bit ARM target and no JavaScript fallback. -# pnpm 11 is the last JavaScript implementation and reads the same lockfile format - if [ "$(node -p 'process.arch')" = 'arm' ]; then \ -# yarn still goes to corepack so "rm -rf /opt/yarn-*" below does not leave its symlinks dangling - corepack enable yarn; \ - npm install -g 'pnpm@11.26.0'; \ - else \ - corepack enable; \ - fi; \ - \ -# pnpm 11 would otherwise honour "packageManager" and switch back to the binary it cannot run. -# Inert under corepack, which owns version switching; exported so it survives the "gosu ghost" drop - export pnpm_config_pm_on_fail=ignore; \ +# Ghost pins its pnpm by hash in "packageManager", so corepack fetches exactly that one + corepack enable; \ \ # everything under the install dir is created by "ghost" rather than chowned afterwards: a recursive # chown would copy the whole tree into a new layer diff --git a/6-next/bookworm/Dockerfile b/6-next/bookworm/Dockerfile index 20c24901..cdebf39b 100644 --- a/6-next/bookworm/Dockerfile +++ b/6-next/bookworm/Dockerfile @@ -58,29 +58,10 @@ ENV GHOST_SHA256=20b2ac6e936299d5b88b37d2a7175712ad35e6ade78a594ab6d495256ab5429 RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - wget \ -# only arm32v7 needs these: it has no prebuilt better-sqlite3 or re2, so they fall back to node-gyp - g++ \ - make \ - python3 \ - ; \ - \ -# Ghost pins its pnpm by hash in "packageManager", so corepack fetches exactly that one -- except on -# arm32v7, where pnpm 12 is a Rust binary with no 32-bit ARM target and no JavaScript fallback. -# pnpm 11 is the last JavaScript implementation and reads the same lockfile format - if [ "$(node -p 'process.arch')" = 'arm' ]; then \ -# yarn still goes to corepack so "rm -rf /opt/yarn-*" below does not leave its symlinks dangling - corepack enable yarn; \ - npm install -g 'pnpm@11.26.0'; \ - else \ - corepack enable; \ - fi; \ - \ -# pnpm 11 would otherwise honour "packageManager" and switch back to the binary it cannot run. -# Inert under corepack, which owns version switching; exported so it survives the "gosu ghost" drop - export pnpm_config_pm_on_fail=ignore; \ + apt-get install -y --no-install-recommends ca-certificates wget; \ + \ +# Ghost pins its pnpm by hash in "packageManager", so corepack fetches exactly that one + corepack enable; \ \ # everything under the install dir is created by "ghost" rather than chowned afterwards: a recursive # chown would copy the whole tree into a new layer diff --git a/Dockerfile-next.template b/Dockerfile-next.template index c734c596..f6d2ecb1 100644 --- a/Dockerfile-next.template +++ b/Dockerfile-next.template @@ -76,30 +76,11 @@ RUN set -eux; \ {{ if is_alpine then "" else ( -}} savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - wget \ -# only arm32v7 needs these: it has no prebuilt better-sqlite3 or re2, so they fall back to node-gyp - g++ \ - make \ - python3 \ - ; \ + apt-get install -y --no-install-recommends ca-certificates wget; \ \ {{ ) end -}} -# Ghost pins its pnpm by hash in "packageManager", so corepack fetches exactly that one -- except on -# arm32v7, where pnpm 12 is a Rust binary with no 32-bit ARM target and no JavaScript fallback. -# pnpm 11 is the last JavaScript implementation and reads the same lockfile format - if [ "$(node -p 'process.arch')" = 'arm' ]; then \ -# yarn still goes to corepack so "rm -rf /opt/yarn-*" below does not leave its symlinks dangling - corepack enable yarn; \ - npm install -g 'pnpm@{{ .pnpm.fallbackVersion }}'; \ - else \ - corepack enable; \ - fi; \ - \ -# pnpm 11 would otherwise honour "packageManager" and switch back to the binary it cannot run. -# Inert under corepack, which owns version switching; exported so it survives the "gosu ghost" drop - export pnpm_config_pm_on_fail=ignore; \ +# Ghost pins its pnpm by hash in "packageManager", so corepack fetches exactly that one + corepack enable; \ \ # everything under the install dir is created by "ghost" rather than chowned afterwards: a recursive # chown would copy the whole tree into a new layer diff --git a/versions.json b/versions.json index 1e872e4a..10d76ac8 100644 --- a/versions.json +++ b/versions.json @@ -16,8 +16,7 @@ "arches": [ "amd64", "arm32v7", - "arm64v8", - "s390x" + "arm64v8" ], "from": "node:22-bookworm-slim" }, @@ -39,16 +38,11 @@ "node": { "version": "22" }, - "pnpm": { - "fallbackVersion": "11.26.0" - }, "variants": { "bookworm": { "arches": [ "amd64", - "arm32v7", - "arm64v8", - "s390x" + "arm64v8" ], "from": "node:22-bookworm-slim" }, diff --git a/versions.sh b/versions.sh index ab2aec22..d9fcc750 100755 --- a/versions.sh +++ b/versions.sh @@ -79,6 +79,7 @@ fi # pins when building for arm32v7. pnpm 11 is the last JavaScript implementation, is still released # alongside 12 ("latest-11"), and reads the same lockfile format, so that architecture builds with # it instead. Pinned here so it is refreshed by the update workflow like every other version. +# Only the Ghost-CLI image needs it: "-next" does not build arm32v7 at all (see below). pnpmFallbackVersion="$( fetch 'https://registry.npmjs.org/pnpm' '."dist-tags"."latest-11" // empty' \ | jq --raw-output '."dist-tags"."latest-11"' @@ -153,7 +154,7 @@ for version in "${versions[@]}"; do x64: "amd64", arm64: "arm64v8", arm: "arm32v7", - s390x: "s390x", + # no s390x: sharp ships a prebuilt for it, but the node:22 images publish none to build on }[.] // empty) # TODO maybe warn/error on unexpected values? | sort ) @@ -206,21 +207,25 @@ for version in "${versions[@]}"; do '{ cli: { version: $version, sha: $sha } }')" fi - export fullVersion nodeVersion pnpmFallbackVersion + export fullVersion nodeVersion pnpmFallbackVersion isNext json="$(jq <<<"$json" --compact-output --argjson doc "$doc" --argjson source "$sourceJson" ' env.nodeVersion as $nodeVersion | .[env.version] = ( { version: env.fullVersion } + $source + + { node: { version: $nodeVersion } } + + (if env.isNext == "" then { pnpm: { fallbackVersion: env.pnpmFallbackVersion } } else {} end) + { - node: { version: $nodeVersion }, - pnpm: { fallbackVersion: env.pnpmFallbackVersion }, variants: ( $doc | with_entries( + # "-next" previews the Ghost 7.0 image, which drops arm32v7: pnpm 12 has no 32-bit ARM + # build, and carrying the pnpm 11 fallback into a new image is not worth it + if env.isNext != "" then .value.arches -= [ "arm32v7" ] else . end + # add image FROM for Dockerfile template and parent arch lookup in generate-stackbrew-library.sh # e.g. "node:22-alpine3.23" or "node:22-trixie-slim" - .value.from = "node:\($nodeVersion)-\(.key)\( + | .value.from = "node:\($nodeVersion)-\(.key)\( if .key | startswith("alpine") then "" else "-slim" end )" )