nvm and node
Browse files- Dockerfile +15 -2
Dockerfile
CHANGED
|
@@ -36,8 +36,21 @@ RUN apt-get install -y \
|
|
| 36 |
RUN wget https://github.com/Alex313031/thorium/releases/download/M117.0.5938.157/thorium-browser_117.0.5938.157_amd64.deb && \
|
| 37 |
dpkg -i thorium-browser_117.0.5938.157_amd64.deb
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
USER admin
|
| 43 |
|
|
|
|
| 36 |
RUN wget https://github.com/Alex313031/thorium/releases/download/M117.0.5938.157/thorium-browser_117.0.5938.157_amd64.deb && \
|
| 37 |
dpkg -i thorium-browser_117.0.5938.157_amd64.deb
|
| 38 |
|
| 39 |
+
|
| 40 |
+
# Install NVM to manage Node.js versions
|
| 41 |
+
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
|
| 42 |
+
|
| 43 |
+
# Activate NVM in the current shell
|
| 44 |
+
RUN export NVM_DIR="$HOME/.nvm" && \
|
| 45 |
+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
|
| 46 |
+
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
| 47 |
+
|
| 48 |
+
# Install Node.js version v18.17.0 and npm v9.6.7 using NVM
|
| 49 |
+
RUN nvm install 18.17.0
|
| 50 |
+
RUN nvm install-latest-npm
|
| 51 |
+
|
| 52 |
+
# Set the installed Node.js version as the default
|
| 53 |
+
RUN nvm alias default 18.17.0
|
| 54 |
|
| 55 |
USER admin
|
| 56 |
|