n8n/docker/images/n8n/Dockerfile

37 lines
1.1 KiB
Docker
Raw Normal View History

FROM node:16-alpine
2019-06-23 03:35:23 -07:00
2019-08-09 15:07:01 -07:00
ARG N8N_VERSION
RUN if [ -z "$N8N_VERSION" ] ; then echo "The N8N_VERSION argument is missing!" ; exit 1; fi
2019-06-23 03:35:23 -07:00
# Update everything and install needed dependencies
2020-02-05 12:28:47 -08:00
RUN apk add --update graphicsmagick tzdata git tini su-exec
2019-06-23 03:35:23 -07:00
# # 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 python3 build-base ca-certificates && \
2022-03-08 00:38:53 -08:00
npm config set python "$(which python3)" && \
npm_config_user=root npm install -g npm@latest full-icu n8n@${N8N_VERSION} && \
apk del build-dependencies \
&& rm -rf /root /tmp/* /var/cache/apk/* && mkdir /root;
2019-06-23 03:35:23 -07:00
# 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 {} \; \
&& rm -rf /root /tmp/* /var/cache/apk/* && mkdir /root
2020-03-26 10:05:23 -07:00
ENV NODE_ICU_DATA /usr/local/lib/node_modules/full-icu
2019-06-23 03:35:23 -07:00
WORKDIR /data
2020-02-05 12:28:47 -08:00
COPY docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT ["tini", "--", "/docker-entrypoint.sh"]
2020-06-30 07:55:17 -07:00
EXPOSE 5678/tcp