musarehmani100 commited on
Commit
4a11d93
1 Parent(s): 0f70a12

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ARG NODE_VERSION=18
2
+ FROM n8nio/base:${NODE_VERSION}
3
+
4
+ ARG N8N_VERSION
5
+ RUN if [ -z "$N8N_VERSION" ] ; then echo "The N8N_VERSION argument is missing!" ; exit 1; fi
6
+
7
+ ENV N8N_VERSION=${N8N_VERSION}
8
+ ENV NODE_ENV=production
9
+ ENV N8N_RELEASE_TYPE=stable
10
+ RUN set -eux; \
11
+ npm install -g --omit=dev n8n@${N8N_VERSION} --ignore-scripts && \
12
+ npm rebuild --prefix=/usr/local/lib/node_modules/n8n sqlite3 && \
13
+ rm -rf /usr/local/lib/node_modules/n8n/node_modules/@n8n/chat && \
14
+ rm -rf /usr/local/lib/node_modules/n8n/node_modules/n8n-design-system && \
15
+ rm -rf /usr/local/lib/node_modules/n8n/node_modules/n8n-editor-ui/node_modules && \
16
+ find /usr/local/lib/node_modules/n8n -type f -name "*.ts" -o -name "*.js.map" -o -name "*.vue" | xargs rm -f && \
17
+ rm -rf /root/.npm
18
+
19
+ COPY --chown=user docker-entrypoint.sh /
20
+
21
+ RUN \
22
+ mkdir .n8n && \
23
+ chown node:node .n8n
24
+ ENV SHELL /bin/sh
25
+ USER node
26
+ ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]