2020-07-05 10:22:25 -07:00
|
|
|
FROM richxsl/rhel7
|
|
|
|
|
|
|
|
ARG N8N_VERSION
|
|
|
|
|
|
|
|
RUN if [ -z "$N8N_VERSION" ] ; then echo "The N8N_VERSION argument is missing!" ; exit 1; fi
|
|
|
|
|
2022-11-04 09:34:47 -07:00
|
|
|
ENV N8N_VERSION=${N8N_VERSION}
|
2020-07-05 10:22:25 -07:00
|
|
|
RUN \
|
|
|
|
yum install -y gcc-c++ make
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
curl -sL https://rpm.nodesource.com/setup_12.x | sudo -E bash -
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
sudo yum install nodejs
|
|
|
|
|
|
|
|
# Set a custom user to not have n8n run as root
|
|
|
|
USER root
|
|
|
|
|
2022-08-06 13:55:51 -07:00
|
|
|
RUN npm_config_user=root npm install -g npm@latest n8n@${N8N_VERSION}
|
2020-07-05 10:22:25 -07:00
|
|
|
|
|
|
|
WORKDIR /data
|
|
|
|
|
|
|
|
CMD "n8n"
|