From 48080411fcb9d2514fa551202b630e285e36d1c1 Mon Sep 17 00:00:00 2001 From: Tommy Date: Mon, 8 Nov 2021 11:40:34 -0500 Subject: [PATCH] Docker: Update to the latest LTS image The Node.js 14 slim image has quite a few vulnerabilities, and I have tested the latest slim image. It works just fine. When installing plugins, `--legacy-peer-deps` is passed to npm because npm v7 (which comes with Node.js v16, the current LTS) changed how peer deps are handled. The new behavior is incompatible with how plugins have historically been installed. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c6339ae72..8cf8f04c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ # # Author: muxator -FROM node:14-buster-slim +FROM node:lts-slim LABEL maintainer="Etherpad team, https://github.com/ether/etherpad-lite" # plugins to install while building the container. By default no plugins are @@ -85,7 +85,7 @@ COPY --chown=etherpad:etherpad ./ ./ # seems to confuse tools such as `npm outdated`, `npm update`, and some ESLint # rules. RUN { [ -z "${ETHERPAD_PLUGINS}" ] || \ - npm install --no-save ${ETHERPAD_PLUGINS}; } && \ + npm install --no-save --legacy-peer-deps ${ETHERPAD_PLUGINS}; } && \ src/bin/installDeps.sh && \ rm -rf ~/.npm