From f740dc8c856032f2865a73d871e715fddefb66a7 Mon Sep 17 00:00:00 2001 From: Casper Bollen Date: Sat, 4 Nov 2023 12:24:56 +0100 Subject: [PATCH] chore: upgraded docker to use new node download instead of deprecated script --- Dockerfile | 16 ++++++++++++++-- package.json | 1 - 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8776c6d..1c96510 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,20 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0 as build # Install node -RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -RUN apt-get update && apt-get install -y nodejs +# RUN curl -sL https://deb.nodesource.com/setup_14.x | bash +# RUN apt-get update && apt-get install -y nodejs +RUN set -uex; \ + 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=18; \ + echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" \ + > /etc/apt/sources.list.d/nodesource.list; \ + apt-get -qy update; \ + apt-get -qy install nodejs; + WORKDIR /workspace COPY .config .config diff --git a/package.json b/package.json index fc1feaf..78b711a 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "description": "Generic Medication Order Entry", "private": true, "scripts": { - "postinstall": "dotnet tool restore && dotnet restore GenPres.sln", "init-assets": "[ -d dist ] || mkdir dist && cp src/Client/public/*.* dist/.", "watch-server": "dotnet watch --project src/Server/Server.fsproj", "start": "npm run init-assets && dotnet fable watch src/Client -o dist -e .jsx --run vite",