mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(core): Fix pdf extract for arm64 docker images (#16522)
This commit is contained in:
@@ -22,9 +22,7 @@ RUN find . -type f -name "*.ts" -o -name "*.vue" -o -name "tsconfig.json" -o -na
|
|||||||
|
|
||||||
# Deploy the `n8n` package into /compiled
|
# Deploy the `n8n` package into /compiled
|
||||||
RUN mkdir /compiled
|
RUN mkdir /compiled
|
||||||
# We don't want to use --no-optional because pdfjs-dist has an optional dependency on
|
RUN NODE_ENV=production DOCKER_BUILD=true pnpm --filter=n8n --prod --no-optional --legacy deploy /compiled
|
||||||
# @napi-rs/canvas, which is required for the pdfjs-dist package to work.
|
|
||||||
RUN NODE_ENV=production DOCKER_BUILD=true pnpm --filter=n8n --prod --legacy deploy /compiled
|
|
||||||
|
|
||||||
# 2. Start with a new clean image with just the code that is needed to run n8n
|
# 2. Start with a new clean image with just the code that is needed to run n8n
|
||||||
FROM n8nio/base:${NODE_VERSION}
|
FROM n8nio/base:${NODE_VERSION}
|
||||||
@@ -71,6 +69,10 @@ RUN \
|
|||||||
mkdir .n8n && \
|
mkdir .n8n && \
|
||||||
chown node:node .n8n
|
chown node:node .n8n
|
||||||
|
|
||||||
|
# pdfjs-dist has an optional dependency on @napi-rs/canvas, which is required
|
||||||
|
# for it to work.
|
||||||
|
RUN cd /usr/local/lib/node_modules/n8n/node_modules/pdfjs-dist && npm install @napi-rs/canvas
|
||||||
|
|
||||||
# Install npm 11.4.1 to fix the vulnerable cross-spawn dependency
|
# Install npm 11.4.1 to fix the vulnerable cross-spawn dependency
|
||||||
RUN npm install -g npm@11.4.1
|
RUN npm install -g npm@11.4.1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user