Skip to content

Instantly share code, notes, and snippets.

@jonathantito
Last active March 23, 2023 15:24
Show Gist options
  • Select an option

  • Save jonathantito/33b4346284a55e5d71eb7595a44357d3 to your computer and use it in GitHub Desktop.

Select an option

Save jonathantito/33b4346284a55e5d71eb7595a44357d3 to your computer and use it in GitHub Desktop.

Revisions

  1. jonathantito revised this gist Mar 22, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion INSTALL_NPM_IN_DOCKERFILE_VSCODE
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    FROM mcr.microsoft.com/vscode/devcontainers/cpp:ubuntu-20.04
    FROM mcr.microsoft.com/vscode/devcontainers/cpp:ubuntu-22.04

    RUN mkdir /usr/local/nvm
    ENV NVM_DIR /usr/local/nvm
  2. jonathantito created this gist Mar 22, 2023.
    13 changes: 13 additions & 0 deletions INSTALL_NPM_IN_DOCKERFILE_VSCODE
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    FROM mcr.microsoft.com/vscode/devcontainers/cpp:ubuntu-20.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