mirror of
https://github.com/aleleba/ubuntu-22.04-gitea-runner-worker.git
synced 2026-03-19 08:16:26 -06:00
Fixing npm installing with nvm.
This commit is contained in:
13
Dockerfile
13
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
|
||||
|
||||
Reference in New Issue
Block a user