-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (20 loc) · 709 Bytes
/
Copy pathDockerfile
File metadata and controls
28 lines (20 loc) · 709 Bytes
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
FROM node:14.15-alpine
# pass N8N_VERSION Argument while building or use default
ARG N8N_VERSION=0.121.0
# Update everything and install needed dependencies
RUN apk add --update graphicsmagick tzdata
# Set a custom user to not have n8n run as root
USER root
# Install n8n and the also temporary all the packages
# it needs to build it correctly.
RUN apk --update add --virtual build-dependencies python build-base && \
npm_config_user=root npm install -g n8n@${N8N_VERSION} && \
apk del build-dependencies
# Specifying work directory
WORKDIR /data
# copy start script to container
COPY ./start.sh /
# make the script executable
RUN chmod +x /start.sh
# define execution entrypoint
CMD ["/start.sh"]