Created
April 25, 2017 10:35
-
-
Save hailiang-wang/780a0c352c86c27e36bf66e1a66508a0 to your computer and use it in GitHub Desktop.
Install nvm inside docker
This file contains hidden or 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
# install dependencies | |
RUN apt-get update && apt-get install -y \ | |
curl \ | |
npm \ | |
nodejs \ | |
git; | |
# compatibility fix for node on ubuntu | |
RUN ln -s /usr/bin/nodejs /usr/bin/node; | |
# install nvm | |
RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.24.1/install.sh | sh; | |
# invoke nvm to install node | |
RUN cp -f ~/.nvm/nvm.sh ~/.nvm/nvm-tmp.sh; \ | |
echo "nvm install 0.12.2; nvm alias default 0.12.2" >> ~/.nvm/nvm-tmp.sh; \ | |
sh ~/.nvm/nvm-tmp.sh; \ | |
rm ~/.nvm/nvm-tmp.sh; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment