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