From 5913142389d8b6718b8f4f12277afa36a18aa751 Mon Sep 17 00:00:00 2001 From: Nihal Gonsalves Date: Wed, 27 Sep 2023 23:29:39 +0200 Subject: [PATCH] fix: remove deprecated nodesource script --- Dockerfile-build | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile-build b/Dockerfile-build index 62a60bd8..6e96c7d4 100644 --- a/Dockerfile-build +++ b/Dockerfile-build @@ -2,13 +2,17 @@ FROM golang:1.20-bullseye as builder ARG VERSION=dev ARG COMMIT=unknown +ARG NODE_MAJOR=18 -RUN apt-get update -RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -RUN apt-get install -y \ - build-essential \ - nodejs \ - python3-pip +RUN apt-get update && apt-get install -y \ + build-essential 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 \ + && 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 update \ + && apt-get install -y \ + python3-pip nodejs \ + && rm -rf /var/lib/apt/lists/* WORKDIR /app ADD Makefile .