Skip to content

Commit e9806d9

Browse files
authored
Merge pull request laradock#1120 from WanchiaTsai/add-env-path-for-node
add ENV PATH, fix the problem of docker-compose exec workspace npm(or…
2 parents 8485add + e568018 commit e9806d9

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

workspace/Dockerfile-56

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
276276
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
277277
;fi
278278

279+
# Add PATH for node
280+
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
281+
279282
#####################################
280283
# YARN:
281284
#####################################

workspace/Dockerfile-70

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
276276
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
277277
;fi
278278

279+
# Add PATH for node
280+
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
281+
279282
#####################################
280283
# YARN:
281284
#####################################

workspace/Dockerfile-71

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
273273
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
274274
;fi
275275

276+
# Add PATH for node
277+
ENV PATH $PATH:$NVM_DIR/versions/node/v${NODE_VERSION}/bin
278+
279+
276280
#####################################
277281
# YARN:
278282
#####################################

0 commit comments

Comments
 (0)