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

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