mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-02 17:57:06 +02:00
fix(core): Rebuild isolated-vm in Docker image for musl libc (#31396)
This commit is contained in:
parent
55a96070c6
commit
80a97bdcf3
|
|
@ -6,7 +6,16 @@ FROM node:${NODE_VERSION}-alpine3.22 AS builder
|
|||
COPY ./compiled /usr/local/lib/node_modules/n8n
|
||||
RUN apk add --no-cache python3 make g++ && \
|
||||
cd /usr/local/lib/node_modules/n8n && \
|
||||
npm rebuild sqlite3
|
||||
npm rebuild sqlite3 && \
|
||||
# Rebuild isolated-vm from source. node-gyp-build's musl detection relies
|
||||
# on /etc/alpine-release which DHI Alpine omits, so the bundled prebuilt
|
||||
# loader picks the glibc binary and segfaults in musl pthread paths.
|
||||
# Removing prebuilds and invoking node-gyp directly avoids npm rebuild's
|
||||
# double-build behavior (built-in node-gyp + install-script node-gyp)
|
||||
# which races on dep-file state.
|
||||
rm -rf node_modules/isolated-vm/prebuilds && \
|
||||
cd node_modules/isolated-vm && \
|
||||
npx --yes node-gyp rebuild --release -j max
|
||||
|
||||
FROM n8nio/base:${NODE_VERSION}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user