From 7b596e5fddbfd0af0f1a7b04353f303bc2b83a27 Mon Sep 17 00:00:00 2001
From: Joel von der Weid <joel.von-der-weid@hesge.ch>
Date: Wed, 3 Jul 2024 13:37:22 +0200
Subject: [PATCH] Add node to sonar docker

---
 sonar/Dockerfile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sonar/Dockerfile b/sonar/Dockerfile
index cc163bc..dedd080 100644
--- a/sonar/Dockerfile
+++ b/sonar/Dockerfile
@@ -1,8 +1,11 @@
+# Node needed to analyze JS/TS files
+FROM node:18-slim AS node_base
+
 FROM gcc:14
 
 ARG SONAR_HOST_URL=https://isc-sonar.edu.hesge.ch
 
-RUN apt update && apt install -y curl unzip build-essential make g++ clang && apt clean
+RUN apt update && apt install -y curl unzip build-essential make g++ clang git-core openssl libssl-dev && apt clean
 
 # Download sonar tools
 RUN mkdir -p /sonar && \
@@ -26,3 +29,5 @@ RUN mkdir -p /usr/src && \
 USER sonar
 WORKDIR /usr/src
 
+COPY --from=node_base /usr/local/bin /usr/local/bin
+COPY --from=node_base /usr/local/lib/node_modules/npm /usr/local/lib/node_modules/npm
-- 
GitLab