From 12b51a78d88d08b3d48b4d4c4e48d82c5f709f8d Mon Sep 17 00:00:00 2001 From: Dominic Burger Date: Wed, 1 Nov 2023 11:45:25 +0100 Subject: [PATCH 1/2] Migrate Node.js installation from unsupported setup script --- Dockerfile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 16cfc4e..cfdb624 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,15 @@ ARG REVISION SHELL ["/bin/bash", "-c"] # Install Node.js -RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - -RUN apt-get install -y nodejs +RUN apt-get update && \ + apt-get install -y ca-certificates curl gnupg && \ + mkdir -p /etc/apt/keyrings && \ + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ + NODE_MAJOR=20 && \ + 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 && \ + apt-get update && \ + apt-get install nodejs -y && \ + rm -rf /var/lib/apt/lists/* # Restore dependencies and tools COPY ["src/ILICheck.Web/ILICheck.Web.csproj", "ILICheck.Web/"] From 357727fbf0ef253be51957e63d3aa08ca67012c7 Mon Sep 17 00:00:00 2001 From: Dominic <18161827+domi-b@users.noreply.github.com> Date: Thu, 2 Nov 2023 09:13:12 +0100 Subject: [PATCH 2/2] Remove already installed packages from apt-get install Co-authored-by: Oliver Gut --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index cfdb624..0e0a896 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ SHELL ["/bin/bash", "-c"] # Install Node.js RUN apt-get update && \ - apt-get install -y ca-certificates curl gnupg && \ + apt-get install -y gnupg && \ mkdir -p /etc/apt/keyrings && \ curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ NODE_MAJOR=20 && \