Last active
March 23, 2023 15:24
-
-
Save jonathantito/33b4346284a55e5d71eb7595a44357d3 to your computer and use it in GitHub Desktop.
INSTALL NPM IN DOCKERFILE VSCODE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/vscode/devcontainers/cpp:ubuntu-22.04 | |
RUN mkdir /usr/local/nvm | |
ENV NVM_DIR /usr/local/nvm | |
ENV NODE_VERSION 14.18.1 | |
RUN curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash \ | |
&& . $NVM_DIR/nvm.sh \ | |
&& nvm install $NODE_VERSION \ | |
&& nvm alias default $NODE_VERSION \ | |
&& nvm use default | |
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules | |
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment