From bf086114d8acbcd264f0ee89872a1fe255b280ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <tomas@imaniti.org>
Date: Mon, 26 Feb 2024 17:08:08 +0100
Subject: [PATCH] update Node.js installer

---
 Dockerfile | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index a855887..6b8a7c7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,8 +8,16 @@ FROM python:3.11
 RUN mkdir /app
 WORKDIR /app
 
-RUN curl -fsSL https://deb.nodesource.com/setup_19.x | bash -
-RUN apt-get install nodejs && rm -rf /var/lib/apt/lists/*
+# Install NodeJS
+ENV NODE_MAJOR=20
+RUN apt-get update
+RUN apt-get install -y ca-certificates curl gnupg
+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
+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 apt-get update
+RUN apt-get install -y nodejs
+RUN rm -rf /var/lib/apt/lists/*
 
 COPY . .
 
-- 
GitLab