From 66aa423214d3de426743271565e1342da1aa78ba Mon Sep 17 00:00:00 2001 From: djacobs7 Date: Mon, 15 Apr 2024 15:07:41 -0700 Subject: [PATCH] Update Dockerfile Dockerfile did not work out of the box. These were necessary changes to get editly running * Put in a minimum NODE_VERSION for ESM support * Add LD_LIBRARY_PATH for canvas support --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 202d27ee..e43df9c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,9 +22,9 @@ RUN apt-get update \ && apt-get -y autoclean # nvm environment variables -ENV NVM_VERSION 0.37.2 +ENV NVM_VERSION 0.39.7 ENV NVM_DIR /usr/local/nvm -ENV NODE_VERSION 14.4.0 +ENV NODE_VERSION 16.15.1 # install nvm # https://github.com/creationix/nvm#install-script @@ -41,6 +41,9 @@ RUN source ${NVM_DIR}/nvm.sh \ ENV NODE_PATH ${NVM_DIR}/v${NODE_VERSION}/lib/node_modules ENV PATH ${NVM_DIR}/versions/node/v${NODE_VERSION}/bin:$PATH +RUN echo "export LD_LIBRARY_PATH=/app/node_modules/canvas/build/Release/" >> /root/.bashrc +ENV LD_LIBRARY_PATH /app/node_modules/canvas/build/Release/ + # confirm installation RUN node -v RUN npm -v