Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
-
# Start with a
|
| 2 |
-
FROM
|
| 3 |
|
| 4 |
# Switch to root to install dependencies and set permissions
|
| 5 |
USER root
|
| 6 |
|
| 7 |
-
# Install n8n
|
| 8 |
-
RUN npm install
|
| 9 |
|
| 10 |
# Create the n8n config folder and set ownership to user ID 1000
|
| 11 |
RUN mkdir -p /home/user/.n8n && \
|
|
@@ -24,5 +24,5 @@ ENV N8N_USER_FOLDER=/home/user/.n8n
|
|
| 24 |
# Fix permissions warning
|
| 25 |
ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
|
| 26 |
|
| 27 |
-
# Start n8n using
|
| 28 |
-
CMD ["/
|
|
|
|
| 1 |
+
# Start with a Node.js base image
|
| 2 |
+
FROM node:20-alpine
|
| 3 |
|
| 4 |
# Switch to root to install dependencies and set permissions
|
| 5 |
USER root
|
| 6 |
|
| 7 |
+
# Install n8n locally
|
| 8 |
+
RUN npm install n8n
|
| 9 |
|
| 10 |
# Create the n8n config folder and set ownership to user ID 1000
|
| 11 |
RUN mkdir -p /home/user/.n8n && \
|
|
|
|
| 24 |
# Fix permissions warning
|
| 25 |
ENV N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
|
| 26 |
|
| 27 |
+
# Start n8n using node
|
| 28 |
+
CMD ["node", "./node_modules/n8n/bin/n8n", "start"]
|