Created
January 23, 2024 21:48
-
-
Save nyteshade/44c7c74240b67e38bbafa5b65a1cc3d9 to your computer and use it in GitHub Desktop.
Getting NVM setup in a docker image
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
# Replace shell with bash so we can source files | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections | |
RUN mkdir -p /usr/local/nvm | |
ENV NVM_DIR /usr/local/nvm | |
ENV NODE_VERSION 21.6.1 | |
RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \ | |
&& . $NVM_DIR/nvm.sh \ | |
&& nvm install $NODE_VERSION \ | |
&& nvm alias default $NODE_VERSION \ | |
&& nvm use default |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment