From b393996d444d44a3d006b9de2d3e1b70bf670545 Mon Sep 17 00:00:00 2001 From: Suteepat Damrongyingsupab Date: Thu, 11 Aug 2016 18:03:27 +0700 Subject: [PATCH] Fixed nvm/node installation not working. --- workspace/Dockerfile | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 36fbaadf..f414f34b 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -75,7 +75,7 @@ ARG PUID=1000 ARG PGID=1000 RUN groupadd -g $PGID laradock && \ useradd -u $PUID -g laradock -m laradock - + ##################################### # Composer: ##################################### @@ -102,17 +102,11 @@ RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \ # Check if NVM needs to be installed ARG INSTALL_NODE=true ENV INSTALL_NODE ${INSTALL_NODE} +ENV NVM_DIR /home/laradock/.nvm RUN if [ ${INSTALL_NODE} = true ]; then \ # Install nvm (A Node Version Manager) - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash \ -;fi -# Again check if NVM needs to be installed -# I had to split this condition link this because when I get it inside the above if statement is refuses to work! -ENV if [ ${INSTALL_NODE} = true ]; then \ - # Set the ENV - NVM_DIR=/home/laradock/.nvm \ - # Install NodeJS with NVM - RUN . ~/.nvm/nvm.sh && \ + curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash && \ + . ~/.nvm/nvm.sh && \ nvm install stable && \ nvm use stable && \ nvm alias stable && \