Subham9126 commited on
Commit
ca8cf25
·
verified ·
1 Parent(s): d293d21

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -24
Dockerfile CHANGED
@@ -1,32 +1,21 @@
1
- FROM naskio/n8n-python:2.13.0
2
- LABEL maintainer="Xiaoliang <xiaoliang.zero@gmail.com>"
3
 
4
- USER root
5
 
6
- # 1. Install venv support (required for n8n to initialize the runner)
7
- RUN apt-get update && apt-get install -y python3-venv && rm -rf /var/lib/apt/lists/*
8
 
9
- # 2. Pre-create the n8n Python Environment
10
- # n8n looks for this specific path to run internal Python tasks
11
- RUN mkdir -p /home/node/.n8n/python_envs/default && \
12
- python3 -m venv /home/node/.n8n/python_envs/default && \
13
- chown -R node:node /home/node/.n8n
14
 
 
 
 
15
  USER node
16
 
17
- # 3. Configure n8n to use the environment we just built
18
- ENV N8N_PYTHON_BINARY=/usr/bin/python3 \
19
- N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false \
20
- N8N_PORT=7860 \
21
- N8N_RUNNERS_ENABLED=true \
22
- # Point n8n to the venv we created in step 2
23
- N8N_RUNNERS_PY_VENV_PATH=/home/node/.n8n/python_envs/default \
24
- # Add your required libraries here
25
- N8N_RUNNERS_PY_PACKAGES="pandas numpy requests" \
26
- HOME=/home/node
27
 
28
- WORKDIR /home/node
29
- EXPOSE 7860
30
 
31
- # Direct execution to bypass the su-exec/chown script
32
- ENTRYPOINT ["tini", "--", "n8n"]
 
1
+ ARG N8N_VERSION=stable
 
2
 
3
+ FROM docker.n8n.io/n8nio/n8n:$N8N_VERSION
4
 
5
+ LABEL maintainer="Xiaoliang <xiaoliang.zero@gmail.com>"
 
6
 
7
+ ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \
8
+ N8N_RUNNERS_ENABLED=true \
9
+ N8N_PROXY_HOPS=1
 
 
10
 
11
+ # https://huggingface.co/docs/hub/spaces-sdks-docker#permissions
12
+ # The container runs with user ID 1000.
13
+ # node docker image already has a user named node with ID 1000.
14
  USER node
15
 
16
+ VOLUME ["$HOME/.n8n"]
 
 
 
 
 
 
 
 
 
17
 
18
+ # n8n default port
19
+ EXPOSE 5678
20
 
21
+ ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]