first try at dockerfile
This commit is contained in:
26
Dockerfile
Normal file
26
Dockerfile
Normal 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
|
||||||
Reference in New Issue
Block a user