jadeantonio commited on
Commit
6523ff4
1 Parent(s): 6a1efd5

Create Dockerfile

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