nvm will handle npm global bin path

This commit is contained in:
Shao Yu-Lung (Allen) 2022-12-16 21:40:24 +08:00
parent 75aa16c277
commit 566eaa64ba

View File

@ -760,7 +760,6 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
&& if [ ${INSTALL_NPM_ANGULAR_CLI} = true ]; then \
npm install -g @angular/cli \
;fi \
&& ln -s `npm bin --global` /home/laradock/.node-bin \
;fi
# Wouldn't execute when added to the RUN statement in the above block
@ -780,9 +779,6 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
;fi
# Add PATH for node
ENV PATH $PATH:/home/laradock/.node-bin
# Make it so the node modules can be executed with 'docker-compose exec'
# We'll create symbolic links into '/usr/local/bin'.
RUN if [ ${INSTALL_NODE} = true ]; then \