From 64ba3712f40b22a7dadc41e64f324b0366424152 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sun, 18 Apr 2021 13:10:25 +0100 Subject: [PATCH] etherpad: use nvm to install an old version of Node.js --- images/etherpad/Dockerfile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/images/etherpad/Dockerfile b/images/etherpad/Dockerfile index 7543f3e..ba005cd 100644 --- a/images/etherpad/Dockerfile +++ b/images/etherpad/Dockerfile @@ -7,23 +7,33 @@ FROM ${REPO_LOCATION}minideb-node AS builder # It's important we checkout a specific commit, otherwise etherpad checks out the latest from develop O.o ARG COMMIT=b99c2cae22f35a0c0831e2fef0719f115b486bd9 -RUN install_packages git ca-certificates +RUN install_packages git ca-certificates curl + RUN mkdir -p /srv \ + && curl -sSL -o /srv/nvm_install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh \ && git clone --branch master https://github.com/ether/etherpad-lite.git /srv/etherpad \ && cd /srv/etherpad && git checkout "${COMMIT}" \ && git status ############################################################################### -FROM ${REPO_LOCATION}minideb-node +FROM ${REPO_LOCATION}minideb +COPY --from=builder /srv/nvm_install.sh /srv/nvm_install.sh COPY --from=builder /srv/etherpad /srv/etherpad COPY settings.json /srv/etherpad/ ENV PYTHON /usr/bin/python3 -RUN mkdir -p /.npm -RUN cd /srv/etherpad \ +# lts-erbium = Node.js 12.x +# We speculate that our problems with Etherpad are because we're using a newer version of Node.js..... :-/ +# nvm needs curl to download versions of Node.js + +RUN install_packages ca-certificates curl \ + && mkdir -p /.npm \ + && bash /srv/nvm_install.sh \ + && nvm install lts/erbium \ + && cd /srv/etherpad \ && install_packages python3 make gcc g++ libc-dev libc++-dev \ && ln -s /usr/bin/python3 /usr/bin/python \ && src/bin/installDeps.sh \