Alirezamp commited on
Commit
0e18e8f
·
verified ·
1 Parent(s): fe7eb81

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:12.13.0-alpine
2
+
3
+ ARG N8N_VERSION
4
+
5
+ RUN if [ -z "$N8N_VERSION" ] ; then echo "The N8N_VERSION argument is missing!" ; exit 1; fi
6
+
7
+ # Update everything and install needed dependencies
8
+ RUN apk add --update graphicsmagick tzdata
9
+
10
+ # # Set a custom user to not have n8n run as root
11
+ USER root
12
+
13
+ # Install n8n and the also temporary all the packages
14
+ # it needs to build it correctly.
15
+ RUN apk --update add --virtual build-dependencies python build-base ca-certificates && \
16
+ npm_config_user=root npm install -g n8n@${N8N_VERSION} && \
17
+ apk del build-dependencies
18
+
19
+ WORKDIR /data
20
+
21
+ CMD ["n8n"]