From 644706616a9da29bf3ad17552f09e53773b1941f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Thu, 28 Sep 2023 10:01:31 +0200 Subject: [PATCH] add nodejs installer script --- docker/scripts/install-nodejs.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 docker/scripts/install-nodejs.sh diff --git a/docker/scripts/install-nodejs.sh b/docker/scripts/install-nodejs.sh new file mode 100755 index 0000000..f206a4f --- /dev/null +++ b/docker/scripts/install-nodejs.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +apt update +apt 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" | tee /etc/apt/sources.list.d/nodesource.list + +apt update +apt install -y nodejs