From 8bdf3feaa7746695d3270ca1101566d3c3c3b951 Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Thu, 7 Dec 2023 23:41:01 -0700 Subject: [PATCH 1/2] fix docker nodejs install --- docs/Dockerfile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/Dockerfile b/docs/Dockerfile index 39b9c51be..34f0a2a74 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -1,12 +1,20 @@ FROM python:3.9 - WORKDIR /app/ +RUN apt-get update +RUN apt-get install -y ca-certificates curl gnupg + # Install NodeJS # -------------- -RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - -RUN apt-get install -y build-essential nodejs npm -RUN npm install -g npm@8.5.0 +# Download and import the Nodesource GPG key +RUN mkdir -p /etc/apt/keyrings +RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg +#Create deb repository +RUN NODE_MAJOR=20 +RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list +# Run Update and Install +RUN apt-get update +RUN apt-get install nodejs -y # Install Poetry # -------------- From 9e40c6c494a60b41738040059f94021f46afcf2d Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Thu, 7 Dec 2023 23:44:36 -0700 Subject: [PATCH 2/2] use install script --- docs/Dockerfile | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/docs/Dockerfile b/docs/Dockerfile index 34f0a2a74..7a5d49b7b 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -2,18 +2,12 @@ FROM python:3.9 WORKDIR /app/ RUN apt-get update -RUN apt-get install -y ca-certificates curl gnupg # Install NodeJS # -------------- -# Download and import the Nodesource GPG key -RUN mkdir -p /etc/apt/keyrings -RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg -#Create deb repository -RUN NODE_MAJOR=20 -RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list -# Run Update and Install -RUN apt-get update +RUN curl -SLO https://deb.nodesource.com/nsolid_setup_deb.sh +RUN chmod 500 nsolid_setup_deb.sh +RUN ./nsolid_setup_deb.sh 20 RUN apt-get install nodejs -y # Install Poetry