Merge pull request #2982 from aa-ahmed-aa/custom_composer_version

give laradock the ability to install custom composer version
This commit is contained in:
Shao Yu-Lung (Allen) 2021-06-04 20:55:03 +08:00 committed by GitHub
commit 3d57064466
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -147,7 +147,12 @@ RUN echo "" >> ~/.bashrc && \
# Update composer
ARG COMPOSER_VERSION=2
ENV COMPOSER_VERSION ${COMPOSER_VERSION}
RUN composer self-update --${COMPOSER_VERSION}
RUN set -eux; \
if [ "$COMPOSER_VERSION" = "1" ] || [ "$COMPOSER_VERSION" = "2" ]; then \
composer self-update --${COMPOSER_VERSION}; \
else \
composer self-update ${COMPOSER_VERSION}; \
fi
USER laradock