Skip to content

Updated ghost to fix armv7 build - #22242

Merged
yosifkit merged 2 commits into
docker-library:masterfrom
acburdine:update-ghost
Sep 10, 2026
Merged

yosifkit merged 2 commits into
docker-library:masterfrom
acburdine:update-ghost

Conversation

@acburdine

Copy link
Copy Markdown
Contributor

Fixed the armv7 build in the Ghost image - see TryGhost/docker-library-ghost#486

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Diff for 24dd0bc:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index 26f6e2f..1b17483 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1,6 +1,6 @@
 Maintainers: Austin Burdine <austin@ghost.org> (@acburdine)
 GitRepo: https://github.com/TryGhost/docker-library-ghost.git
-GitCommit: 5deb5f61ead677a9d4acb3007289071ae2b7f558
+GitCommit: bf283c39f99329242ea095b56ab886dcc978d150
 
 Tags: 6.63.0-alpine3.23, 6.63.0-alpine, 6.63-alpine3.23, 6.63-alpine, 6-alpine3.23, 6-alpine, alpine3.23, alpine
 Architectures: amd64, arm64v8
@@ -15,5 +15,5 @@ Architectures: amd64, arm64v8
 Directory: 6-next/alpine3.23
 
 Tags: 6.63.0-next-bookworm, 6.63.0-next, 6.63-next-bookworm, 6.63-next, 6-next-bookworm, 6-next, next-bookworm, next
-Architectures: amd64, arm32v7, arm64v8
+Architectures: amd64, arm64v8
 Directory: 6-next/bookworm
diff --git a/ghost_alpine/Dockerfile b/ghost_alpine/Dockerfile
index 6f8fda2..4314282 100644
--- a/ghost_alpine/Dockerfile
+++ b/ghost_alpine/Dockerfile
@@ -52,7 +52,18 @@ RUN set -eux; \
 	\
 	apk add --no-cache --virtual .ghost-cli-deps git; \
 	\
+# pnpm 12 is a Rust binary with no 32-bit ARM target and no JavaScript fallback, so corepack cannot
+# produce the version "packageManager" pins on arm32v7. pnpm 11 is the last JavaScript
+# implementation and reads the same lockfile format, so that arch installs with it instead
+	if [ "$(node -p 'process.arch')" = 'arm' ]; then \
+		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;
+# exported because Ghost-CLI spawns pnpm itself. Inert under corepack, which owns version switching
+	export pnpm_config_pm_on_fail=ignore; \
 	\
 # corepack's downloads, pnpm's metadata cache and pnpm's store all derive their location
 # from these, so pointing them at /tmp keeps every throwaway byte in one place
@@ -92,6 +103,9 @@ RUN set -eux; \
 	mkdir -p "$GHOST_INSTALL"; \
 	chown node:node "$GHOST_INSTALL"; \
 	\
+# "ghost install" and "pnpm store prune" below both run pnpm; see the note in the Ghost-CLI stage
+	export pnpm_config_pm_on_fail=ignore; \
+	\
 	apk add --no-cache --virtual .build-deps-ghost g++ linux-headers make python3 py3-setuptools; \
 	\
 	gosu node ghost install "$GHOST_VERSION" --db mysql --dbhost mysql --no-prompt --no-stack --no-setup --dir "$GHOST_INSTALL"; \
diff --git a/ghost_latest/Dockerfile b/ghost_latest/Dockerfile
index 452e2ea..57e33f6 100644
--- a/ghost_latest/Dockerfile
+++ b/ghost_latest/Dockerfile
@@ -51,7 +51,18 @@ RUN set -eux; \
 	apt-get update; \
 	apt-get install -y --no-install-recommends ca-certificates git; \
 	\
+# pnpm 12 is a Rust binary with no 32-bit ARM target and no JavaScript fallback, so corepack cannot
+# produce the version "packageManager" pins on arm32v7. pnpm 11 is the last JavaScript
+# implementation and reads the same lockfile format, so that arch installs with it instead
+	if [ "$(node -p 'process.arch')" = 'arm' ]; then \
+		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;
+# exported because Ghost-CLI spawns pnpm itself. Inert under corepack, which owns version switching
+	export pnpm_config_pm_on_fail=ignore; \
 	\
 # corepack's downloads, pnpm's metadata cache and pnpm's store all derive their location
 # from these, so pointing them at /tmp keeps every throwaway byte in one place
@@ -94,6 +105,9 @@ RUN set -eux; \
 	mkdir -p "$GHOST_INSTALL"; \
 	chown node:node "$GHOST_INSTALL"; \
 	\
+# "ghost install" and "pnpm store prune" below both run pnpm; see the note in the Ghost-CLI stage
+	export pnpm_config_pm_on_fail=ignore; \
+	\
 	savedAptMark="$(apt-mark showmanual)"; \
 	apt-get update; \
 	apt-get install -y --no-install-recommends g++ make python3; \
diff --git a/ghost_next/Dockerfile b/ghost_next/Dockerfile
index 25fa0e0..cdebf39 100644
--- a/ghost_next/Dockerfile
+++ b/ghost_next/Dockerfile
@@ -58,14 +58,7 @@ 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 \
-	; \
+	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; \

Relevant Maintainers:

@yosifkit
yosifkit merged commit 30002c2 into docker-library:master Sep 10, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants