mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 20:54:07 -08:00
🐳 Update Node.js versions of Docker images to 16
This commit is contained in:
parent
1a1d50002e
commit
c45ab96559
|
@ -1,11 +1,11 @@
|
||||||
# 1. Create an image to build n8n
|
# 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
|
# Update everything and install needed dependencies
|
||||||
USER root
|
USER root
|
||||||
|
|
||||||
# Install all needed dependencies
|
# 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
|
npm_config_user=root npm install -g lerna
|
||||||
|
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
@ -20,13 +20,14 @@ COPY packages/nodes-base/ ./packages/nodes-base/
|
||||||
COPY packages/workflow/ ./packages/workflow/
|
COPY packages/workflow/ ./packages/workflow/
|
||||||
RUN rm -rf node_modules packages/*/node_modules packages/*/dist
|
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 npm install --production --loglevel notice
|
||||||
RUN lerna bootstrap --hoist -- --production
|
RUN lerna bootstrap --hoist -- --production
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
|
|
||||||
# 2. Start with a new clean image with just the code that is needed to run n8n
|
# 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
|
USER root
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM node:14.15
|
FROM node:16
|
||||||
|
|
||||||
ARG N8N_VERSION
|
ARG N8N_VERSION
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM node:14.15-alpine
|
FROM node:16-alpine
|
||||||
|
|
||||||
ARG N8N_VERSION
|
ARG N8N_VERSION
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ USER root
|
||||||
|
|
||||||
# Install n8n and the also temporary all the packages
|
# Install n8n and the also temporary all the packages
|
||||||
# it needs to build it correctly.
|
# 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} && \
|
npm_config_user=root npm install -g full-icu n8n@${N8N_VERSION} && \
|
||||||
apk del build-dependencies \
|
apk del build-dependencies \
|
||||||
&& rm -rf /root /tmp/* /var/cache/apk/* && mkdir /root;
|
&& rm -rf /root /tmp/* /var/cache/apk/* && mkdir /root;
|
||||||
|
|
Loading…
Reference in a new issue