Merge pull request #3331 from bestlong/workspace-node

fix: workspace nvm install node
This commit is contained in:
Shao Yu-Lung (Allen) 2022-12-16 22:54:16 +08:00 committed by GitHub
commit f44f2f4261
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -736,7 +736,7 @@ ENV NVM_NODEJS_ORG_MIRROR ${NVM_NODEJS_ORG_MIRROR}
RUN if [ ${INSTALL_NODE} = true ]; then \
# Install nvm (A Node Version Manager)
mkdir -p $NVM_DIR && \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install ${NODE_VERSION} \
&& nvm use ${NODE_VERSION} \
@ -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 \