give laradock the ability to install custom composer version

This commit is contained in:
aa-ahmed-aa 2021-06-02 19:14:30 +02:00
parent 77be7c4001
commit da1124aacb
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