Spaces:
Sleeping
Sleeping
stanbrewman
commited on
Commit
•
ecffbea
1
Parent(s):
3519aa3
Create Dockerfile
Browse files- Dockerfile +34 -0
Dockerfile
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
ENV N8N_PORT=7860
|
17 |
+
RUN set -eux; \
|
18 |
+
npm install -g --omit=dev n8n@${N8N_VERSION} --ignore-scripts && \
|
19 |
+
npm rebuild --prefix=/usr/local/lib/node_modules/n8n sqlite3 && \
|
20 |
+
rm -rf /usr/local/lib/node_modules/n8n/node_modules/@n8n/chat && \
|
21 |
+
rm -rf /usr/local/lib/node_modules/n8n/node_modules/n8n-design-system && \
|
22 |
+
rm -rf /usr/local/lib/node_modules/n8n/node_modules/n8n-editor-ui/node_modules && \
|
23 |
+
find /usr/local/lib/node_modules/n8n -type f -name "*.ts" -o -name "*.js.map" -o -name "*.vue" | xargs rm -f && \
|
24 |
+
rm -rf /root/.npm
|
25 |
+
|
26 |
+
COPY docker-entrypoint.sh /
|
27 |
+
RUN chmod +x /docker-entrypoint.sh
|
28 |
+
|
29 |
+
RUN \
|
30 |
+
mkdir .n8n && \
|
31 |
+
chown node:node .n8n
|
32 |
+
ENV SHELL /bin/sh
|
33 |
+
USER node
|
34 |
+
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
|