Merge pull request #489 from laradock/yarn
Support specific version of yarn.
This commit is contained in:
commit
047e7f7cc3
@ -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
|
|||||||
|
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user