Fixing npm installing with nvm.

This commit is contained in:
2026-02-27 02:20:28 +00:00
parent 0601bf3664
commit df27a5b559
2 changed files with 11 additions and 4 deletions

View File

@@ -17,9 +17,16 @@ RUN apt-get update -y && \
apt-get upgrade -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 apt-get install -y libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2t64 libxtst6 xauth xvfb
# Installing Node.js # Installing Node.js with nvm
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \ ENV NVM_DIR=/root/.nvm
apt-get install -y nodejs 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 # Finished installing Node.js
#Installing Docker #Installing Docker

View File

@@ -1,3 +1,3 @@
# Ubuntu 22.04 Gitea Runner Worker # Ubuntu 22.04 Gitea Runner Worker
## Version 1.2.2 ## Version 1.2.3