Support specific version of yarn.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
b62d9bcb60
commit
b8142222e5
|
@ -28,6 +28,7 @@ services:
|
|||
- PUID=1000
|
||||
- PGID=1000
|
||||
- NODE_VERSION=stable
|
||||
- YARN_VERSION=latest
|
||||
- TZ=UTC
|
||||
volumes_from:
|
||||
- applications
|
||||
|
|
|
@ -189,10 +189,16 @@ USER laradock
|
|||
|
||||
ARG INSTALL_YARN=false
|
||||
ENV INSTALL_YARN ${INSTALL_YARN}
|
||||
ARG YARN_VERSION=latest
|
||||
ENV YARN_VERSION ${YARN_VERSION}
|
||||
|
||||
RUN if [ ${INSTALL_YARN} = true ]; then \
|
||||
[ -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 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \
|
||||
;fi
|
||||
|
|
Loading…
Reference in New Issue