forked from n8n-io/n8n
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
61 lines (44 loc) · 1.6 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# 1. Create an image to build n8n
FROM node:14.15-alpine as builder
# Update everything and install needed dependencies
USER root
# Install all needed dependencies
RUN apk --update add --virtual build-dependencies python build-base ca-certificates && \
npm_config_user=root npm install -g lerna
WORKDIR /data
COPY lerna.json .
COPY package.json .
COPY packages/cli/ ./packages/cli/
COPY packages/core/ ./packages/core/
COPY packages/design-system/ ./packages/design-system/
#COPY packages/editor-ui/ ./packages/editor-ui/
COPY packages/nodes-base/ ./packages/nodes-base/
COPY packages/workflow/ ./packages/workflow/
RUN rm -rf node_modules packages/*/node_modules packages/*/dist
# --production --loglevel notice
RUN npm install
# -- --production
RUN lerna bootstrap --hoist
RUN npm run build
# 2. Start with a new clean image with just the code that is needed to run n8n
#FROM node:14.15-alpine
#USER root
RUN apk add --update graphicsmagick tzdata tini su-exec git
#WORKDIR /data
# Install all needed dependencies
RUN npm_config_user=root npm install -g full-icu
# Install fonts
RUN apk --no-cache add --virtual fonts msttcorefonts-installer fontconfig && \
update-ms-fonts && \
fc-cache -f && \
apk del fonts && \
find /usr/share/fonts/truetype/msttcorefonts/ -type l -exec unlink {} \;
ENV NODE_ICU_DATA /usr/local/lib/node_modules/full-icu
#COPY --from=builder /data ./
COPY docker-entrypoint.sh /docker-entrypoint.sh
# make the script executable
RUN chmod +x /docker-entrypoint.sh
# define execution entrypoint
CMD ["/docker-entrypoint.sh"]
#ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
#EXPOSE 5678/tcp