Merge pull request #261 from appleboy/patch-4

support specific node version
This commit is contained in:
Mahmoud Zalt 2016-08-30 10:59:50 +03:00 committed by GitHub
commit 6c71d6d84f
2 changed files with 7 additions and 4 deletions

View File

@ -16,6 +16,7 @@ services:
- INSTALL_WORKSPACE_SSH=false
- PUID=1000
- PGID=1000
- NODE_VERSION=stable
volumes_from:
- volumes_source
extra_hosts:

View File

@ -141,16 +141,18 @@ USER laradock
#####################################
# Check if NVM needs to be installed
ARG NODE_VERSION=stable
ENV NODE_VERSION ${NODE_VERSION}
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 && \
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.6/install.sh | bash && \
. ~/.nvm/nvm.sh && \
nvm install stable && \
nvm use stable && \
nvm alias stable && \
nvm install ${NODE_VERSION} && \
nvm use ${NODE_VERSION} && \
nvm alias ${NODE_VERSION} && \
npm install -g gulp bower \
;fi