diff --git a/workspace/Dockerfile b/workspace/Dockerfile index b0d4506..64deb56 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -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