Support Yarn MANAGEMENT tool.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2016-10-13 12:06:30 +08:00
parent a2847316c4
commit 62e0f0443c
2 changed files with 25 additions and 0 deletions

View File

@ -11,6 +11,7 @@ services:
- INSTALL_XDEBUG=false
- INSTALL_MONGO=false
- INSTALL_NODE=false
- INSTALL_YARN=false
- INSTALL_DRUSH=false
- INSTALL_AEROSPIKE_EXTENSION=false
- COMPOSER_GLOBAL_INSTALL=false

View File

@ -181,6 +181,30 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
;fi
#####################################
# YARN:
#####################################
USER laradock
ARG INSTALL_YARN=false
ENV INSTALL_YARN ${INSTALL_YARN}
RUN if [ ${INSTALL_YARN} = true ]; then \
curl -o- -L https://yarnpkg.com/install.sh | bash && \
echo "" >> ~/.bashrc && \
echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \
;fi
# Add YARN binaries to root's .bashrc
USER root
RUN if [ ${INSTALL_YARN} = true ]; then \
echo "" >> ~/.bashrc && \
echo 'export YARN_DIR="/home/laradock/.yarn"' >> ~/.bashrc && \
echo 'export PATH="$YARN_DIR/bin:$PATH"' >> ~/.bashrc \
;fi
#####################################
# PHP Aerospike:
#####################################