diff --git a/docker/images/n8n-custom/Dockerfile b/docker/images/n8n-custom/Dockerfile index 8b39df673f..8c992384d8 100644 --- a/docker/images/n8n-custom/Dockerfile +++ b/docker/images/n8n-custom/Dockerfile @@ -1,11 +1,11 @@ # 1. Create an image to build n8n -FROM node:14.15-alpine as builder +FROM node:16-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 && \ +RUN apk --update add --virtual build-dependencies python3 build-base ca-certificates && \ npm_config_user=root npm install -g lerna WORKDIR /data @@ -20,13 +20,14 @@ COPY packages/nodes-base/ ./packages/nodes-base/ COPY packages/workflow/ ./packages/workflow/ RUN rm -rf node_modules packages/*/node_modules packages/*/dist +RUN npm config set legacy-peer-deps true RUN npm install --production --loglevel notice RUN lerna bootstrap --hoist -- --production 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 +FROM node:16-alpine USER root diff --git a/docker/images/n8n-debian/Dockerfile b/docker/images/n8n-debian/Dockerfile index 95c79828e4..e833bb6f31 100644 --- a/docker/images/n8n-debian/Dockerfile +++ b/docker/images/n8n-debian/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14.15 +FROM node:16 ARG N8N_VERSION diff --git a/docker/images/n8n/Dockerfile b/docker/images/n8n/Dockerfile index 9abd32faed..f5aa3cb594 100644 --- a/docker/images/n8n/Dockerfile +++ b/docker/images/n8n/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14.15-alpine +FROM node:16-alpine ARG N8N_VERSION @@ -12,7 +12,7 @@ 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 ca-certificates && \ +RUN apk --update add --virtual build-dependencies python3 build-base ca-certificates && \ npm_config_user=root npm install -g full-icu n8n@${N8N_VERSION} && \ apk del build-dependencies \ && rm -rf /root /tmp/* /var/cache/apk/* && mkdir /root;