AnishaG0201 commited on
Commit
1a0e201
·
verified ·
1 Parent(s): 5a14b3c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -3
Dockerfile CHANGED
@@ -8,12 +8,15 @@ ENV N8N_BASIC_AUTH_ACTIVE=true
8
  ENV N8N_BASIC_AUTH_USER="admin"
9
  ENV N8N_BASIC_AUTH_PASSWORD="password"
10
 
 
 
 
 
 
 
11
  # Expose the port n8n will run on
12
  EXPOSE 7860
13
 
14
- # Ensure Node.js and n8n command path is set correctly
15
- RUN npm install -g n8n
16
-
17
  # Start n8n
18
  CMD ["n8n", "start"]
19
 
 
8
  ENV N8N_BASIC_AUTH_USER="admin"
9
  ENV N8N_BASIC_AUTH_PASSWORD="password"
10
 
11
+ # Ensure correct permissions for the installation
12
+ USER root
13
+
14
+ # Set up n8n to install as root, avoiding permission issues
15
+ RUN npm install -g n8n --unsafe-perm=true
16
+
17
  # Expose the port n8n will run on
18
  EXPOSE 7860
19
 
 
 
 
20
  # Start n8n
21
  CMD ["n8n", "start"]
22