Files
n8n-install/n8n/Dockerfile.runner
Yury Kossakovsky 27a794e7eb fix: install npm packages in task runner for code node support
n8n v2.0 executes code nodes in a separate task runner container.
the runner image (n8nio/runners) doesn't include npm packages like
cheerio, axios, moment, lodash - causing "module is disallowed" errors.

- add Dockerfile.runner with npm packages for code nodes
- rename Dockerfile to Dockerfile.n8n for clarity
- update docker-compose.yml to use custom runner build
2025-12-11 11:39:01 -07:00

11 lines
251 B
Docker

ARG N8N_VERSION=stable
FROM n8nio/runners:${N8N_VERSION}
USER root
# Install npm packages that can be used in Code nodes
# These must match NODE_FUNCTION_ALLOW_EXTERNAL in docker-compose.yml
RUN npm install -g cheerio axios moment lodash
USER node