first try at dockerfile

This commit is contained in:
2025-12-24 10:53:34 -08:00
parent cd0f53e088
commit 35dd4650ad

26
Dockerfile Normal file
View File

@@ -0,0 +1,26 @@
FROM n8nio/runners:latest
USER root
RUN cd /opt/runners/task-runner-python && uv pip install numpy pandas
RUN cat >/n8n-task-runners.json <<EOL
{
"task-runners": [
{
"runner-type": "javascript",
"env-overrides": {
"NODE_FUNCTION_ALLOW_BUILTIN": "crypto", // <-- allowlist Node.js builtin modules here
"NODE_FUNCTION_ALLOW_EXTERNAL": "moment,uuid", // <-- allowlist third-party JS packages here
}
},
{
"runner-type": "python",
"env-overrides": {
"PYTHONPATH": "/opt/runners/task-runner-python",
"N8N_RUNNERS_STDLIB_ALLOW": "json", // <-- allowlist Python standard library packages here
"N8N_RUNNERS_EXTERNAL_ALLOW": "numpy,pandas" // <-- allowlist third-party Python packages here
}
}
]
}
EOL
COPY n8n-task-runners.json /etc/n8n-task-runners.json
USER runner