Subham9126 commited on
Commit
565e8b1
·
verified ·
1 Parent(s): 4e67050

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -20
Dockerfile CHANGED
@@ -1,29 +1,16 @@
1
- ARG N8N_VERSION=stable
2
- FROM docker.n8n.io/n8nio/n8n:$N8N_VERSION
3
- LABEL maintainer="Xiaoliang <xiaoliang.zero@gmail.com>"
4
-
5
- # 1. Switch to root user to install system dependencies
6
- USER root
7
 
8
- # 2. Install Python 3, pip, virtualenv, and build tools
9
- # (build-base is included in case you need to compile Python packages like numpy/pandas)
10
- RUN apk add --no-cache python3 py3-pip py3-virtualenv build-base
11
-
12
- # 3. Switch back to the default non-root user (node) for security
13
- USER node
14
 
15
- # 4. Set Environment Variables
16
- # Removed N8N_RUNNERS_ENABLED (Deprecated)
17
- # Added NODE_FUNCTION_ALLOW_EXTERNAL to permit importing third-party libraries in Code nodes
18
  ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \
19
- N8N_PROXY_HOPS=1 \
20
- NODE_FUNCTION_ALLOW_EXTERNAL="*"
21
-
22
- # (Optional) Tell n8n which Python libraries to auto-install into its internal virtual environment
23
- # ENV N8N_RUNNERS_PY_PACKAGES="requests pandas beautifulsoup4"
24
 
25
  # https://huggingface.co/docs/hub/spaces-sdks-docker#permissions
26
  # The container runs with user ID 1000.
 
 
 
27
  VOLUME ["$HOME/.n8n"]
28
 
29
  # n8n default port
 
1
+ FROM naskio/n8n-python:2.13.0
 
 
 
 
 
2
 
3
+ LABEL maintainer="Xiaoliang <xiaoliang.zero@gmail.com>"
 
 
 
 
 
4
 
 
 
 
5
  ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \
6
+ N8N_RUNNERS_ENABLED=true \
7
+ N8N_PROXY_HOPS=1
 
 
 
8
 
9
  # https://huggingface.co/docs/hub/spaces-sdks-docker#permissions
10
  # The container runs with user ID 1000.
11
+ # node docker image already has a user named node with ID 1000.
12
+ USER node
13
+
14
  VOLUME ["$HOME/.n8n"]
15
 
16
  # n8n default port