From 5946244bef684cce4b2273e297cd0be6e2755187 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 17 Jun 2021 20:51:42 -0400 Subject: [PATCH] Docker: Nuke all of `~/.npm` after installing packages --- Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 73620476..33d8553d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,11 +68,10 @@ WORKDIR "${EP_DIR}" COPY --chown=etherpad:etherpad ./ ./ -# install node dependencies for Etherpad RUN src/bin/installDeps.sh && \ - rm -rf ~/.npm/_cacache - -RUN [ -z "${ETHERPAD_PLUGINS}" ] || npm install --no-save ${ETHERPAD_PLUGINS} + { [ -z "${ETHERPAD_PLUGINS}" ] || \ + npm install --no-save ${ETHERPAD_PLUGINS}; } && \ + rm -rf ~/.npm # Copy the configuration file. COPY --chown=etherpad:etherpad ./settings.json.docker "${EP_DIR}"/settings.json