File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ services:
2828 - PUID=1000
2929 - PGID=1000
3030 - NODE_VERSION=stable
31+ - YARN_VERSION=latest
3132 - TZ=UTC
3233 volumes_from :
3334 - applications
Original file line number Diff line number Diff line change @@ -189,10 +189,16 @@ USER laradock
189189
190190ARG INSTALL_YARN=false
191191ENV INSTALL_YARN ${INSTALL_YARN}
192+ ARG YARN_VERSION=latest
193+ ENV YARN_VERSION ${YARN_VERSION}
192194
193195RUN if [ ${INSTALL_YARN} = true ]; then \
194196 [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \
195- curl -o- -L https://yarnpkg.com/install.sh | bash && \
197+ if [ ${YARN_VERSION} = "latest" ]; then \
198+ curl -o- -L https://yarnpkg.com/install.sh | bash; \
199+ else \
200+ curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}; \
201+ fi && \
196202 echo "" >> ~/.bashrc && \
197203 echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \
198204;fi
You can’t perform that action at this time.
0 commit comments