Spaces:
Runtime error
Runtime error
Update Dockerfile
#4
by
Basha24
- opened
- Dockerfile +11 -16
Dockerfile
CHANGED
|
@@ -1,21 +1,16 @@
|
|
| 1 |
-
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
| 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 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
EXPOSE 5678
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
| 1 |
+
# Use the official n8n image
|
| 2 |
+
FROM n8nio/n8n:latest
|
| 3 |
|
| 4 |
+
# Switch to root to set up directory permissions
|
| 5 |
+
USER root
|
| 6 |
+
RUN mkdir -p /home/node/.n8n && chown -R node:node /home/node/.n8n
|
| 7 |
|
| 8 |
+
# Switch back to the node user
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
USER node
|
| 10 |
|
| 11 |
+
# Hugging Face mandatory port
|
| 12 |
+
ENV N8N_PORT=7860
|
| 13 |
+
EXPOSE 7860
|
|
|
|
| 14 |
|
| 15 |
+
# Use the absolute path to start n8n on Linux
|
| 16 |
+
CMD ["n8n", "start"]
|