Skip to content

Commit 78be0b5

Browse files
committed
support specific node version
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
1 parent 5a980b1 commit 78be0b5

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ services:
1616
- INSTALL_WORKSPACE_SSH=false
1717
- PUID=1000
1818
- PGID=1000
19+
- NODE_VERSION=stable
1920
volumes_from:
2021
- volumes_source
2122
extra_hosts:

workspace/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,18 @@ USER laradock
141141
#####################################
142142

143143
# Check if NVM needs to be installed
144+
ARG NODE_VERSION=stable
145+
ENV NODE_VERSION ${NODE_VERSION}
144146
ARG INSTALL_NODE=true
145147
ENV INSTALL_NODE ${INSTALL_NODE}
146148
ENV NVM_DIR /home/laradock/.nvm
147149
RUN if [ ${INSTALL_NODE} = true ]; then \
148150
# Install nvm (A Node Version Manager)
149151
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash && \
150152
. ~/.nvm/nvm.sh && \
151-
nvm install stable && \
152-
nvm use stable && \
153-
nvm alias stable && \
153+
nvm install ${NODE_VERSION} && \
154+
nvm use ${NODE_VERSION} && \
155+
nvm alias ${NODE_VERSION} && \
154156
npm install -g gulp bower \
155157
;fi
156158

0 commit comments

Comments
 (0)