hijnu commited on
Commit
0800038
·
verified ·
1 Parent(s): 213a3f1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -4
Dockerfile CHANGED
@@ -18,16 +18,17 @@ RUN set -eux; \
18
 
19
  RUN mkdir -p /home/node/.n8n/nodes
20
  WORKDIR /home/node/.n8n/nodes
21
- RUN cd /home/node/.n8n/nodes
22
  RUN npm install n8n-nodes-browserless
23
  RUN ls -lah
24
 
25
  # Set a custom user to not have n8n run as root
26
- USER root
27
  WORKDIR /data
28
- RUN apk --no-cache add su-exec
29
  COPY docker-entrypoint.sh /docker-entrypoint.sh
30
  RUN chmod +x /docker-entrypoint.sh
31
  RUN chmod 777 /usr/local/lib/node_modules
32
  RUN chmod -R 777 /home/node/.n8n/nodes
33
- ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
 
 
 
 
18
 
19
  RUN mkdir -p /home/node/.n8n/nodes
20
  WORKDIR /home/node/.n8n/nodes
 
21
  RUN npm install n8n-nodes-browserless
22
  RUN ls -lah
23
 
24
  # Set a custom user to not have n8n run as root
 
25
  WORKDIR /data
26
+ RUN apk --no-cache add tini
27
  COPY docker-entrypoint.sh /docker-entrypoint.sh
28
  RUN chmod +x /docker-entrypoint.sh
29
  RUN chmod 777 /usr/local/lib/node_modules
30
  RUN chmod -R 777 /home/node/.n8n/nodes
31
+ ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
32
+
33
+ # 默认用户切换
34
+ USER node