Commit 047e7f7c authored by Bo-Yi Wu's avatar Bo-Yi Wu Committed by GitHub

Merge pull request #489 from laradock/yarn

Support specific version of yarn.
parents b62d9bcb b8142222
...@@ -28,6 +28,7 @@ services: ...@@ -28,6 +28,7 @@ services:
- PUID=1000 - PUID=1000
- PGID=1000 - PGID=1000
- NODE_VERSION=stable - NODE_VERSION=stable
- YARN_VERSION=latest
- TZ=UTC - TZ=UTC
volumes_from: volumes_from:
- applications - applications
......
...@@ -189,10 +189,16 @@ USER laradock ...@@ -189,10 +189,16 @@ USER laradock
ARG INSTALL_YARN=false ARG INSTALL_YARN=false
ENV INSTALL_YARN ${INSTALL_YARN} ENV INSTALL_YARN ${INSTALL_YARN}
ARG YARN_VERSION=latest
ENV YARN_VERSION ${YARN_VERSION}
RUN if [ ${INSTALL_YARN} = true ]; then \ RUN if [ ${INSTALL_YARN} = true ]; then \
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \ [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \
curl -o- -L https://yarnpkg.com/install.sh | bash && \ if [ ${YARN_VERSION} = "latest" ]; then \
curl -o- -L https://yarnpkg.com/install.sh | bash; \
else \
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}; \
fi && \
echo "" >> ~/.bashrc && \ echo "" >> ~/.bashrc && \
echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \ echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \
;fi ;fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment