From 78be0b577e3d59223cfd4f5ad87f83843a91abd3 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 27 Aug 2016 19:38:44 +0800 Subject: [PATCH 1/2] support specific node version Signed-off-by: Bo-Yi Wu --- docker-compose.yml | 1 + workspace/Dockerfile | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ecc4fde..5f88696 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,7 @@ services: - INSTALL_WORKSPACE_SSH=false - PUID=1000 - PGID=1000 + - NODE_VERSION=stable volumes_from: - volumes_source extra_hosts: diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 926615b..f52020a 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -141,6 +141,8 @@ 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 @@ -148,9 +150,9 @@ 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 && \ . ~/.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 From 294fe31a801011740b8cadd007fc8512a1811e86 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 27 Aug 2016 22:54:59 +0800 Subject: [PATCH 2/2] update nvm version. Signed-off-by: Bo-Yi Wu --- workspace/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index f52020a..bc0ef16 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -148,7 +148,7 @@ 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 ${NODE_VERSION} && \ nvm use ${NODE_VERSION} && \