From df27a5b55927eb5cd4062a92b6b5c85ad3950813 Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Fri, 27 Feb 2026 02:20:28 +0000 Subject: [PATCH] Fixing npm installing with nvm. --- Dockerfile | 13 ++++++++++--- README.md | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 52aec4f..80e64c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,9 +17,16 @@ RUN apt-get update -y && \ apt-get upgrade -y && \ apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb -# Installing Node.js -RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \ - apt-get install -y nodejs +# Installing Node.js with nvm +ENV NVM_DIR=/root/.nvm +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.4/install.sh | bash && \ + . "$NVM_DIR/nvm.sh" && \ + nvm install 24 && \ + nvm use 24 && \ + nvm alias default 24 && \ + ln -sf "$NVM_DIR/versions/node/$(nvm version)/bin/node" /usr/local/bin/node && \ + ln -sf "$NVM_DIR/versions/node/$(nvm version)/bin/npm" /usr/local/bin/npm && \ + ln -sf "$NVM_DIR/versions/node/$(nvm version)/bin/npx" /usr/local/bin/npx # Finished installing Node.js #Installing Docker diff --git a/README.md b/README.md index 941035b..9508d24 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # Ubuntu 22.04 Gitea Runner Worker -## Version 1.2.2 \ No newline at end of file +## Version 1.2.3 \ No newline at end of file