From fa4cc40c0c039583d6d72b023ec2df6bfec3af87 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Tue, 4 Jun 2024 17:50:01 +0400 Subject: [PATCH] use a new Docker arg to control composer install command flags --- Dockerfile | 3 ++- docker-compose.yml | 5 ++++- dockerbuild/run-integration-tests.sh | 1 - dockerbuild/run-metadata-tests.sh | 1 - 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index d55ec50f..ec614245 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,10 +34,11 @@ RUN curl https://raw.githubusercontent.com/silinternational/s3-expand/1.5/s3-exp WORKDIR /data # Install/cleanup composer dependencies +ARG COMPOSER_FLAGS="--prefer-dist --no-interaction --no-dev --optimize-autoloader --no-scripts --no-progress" COPY composer.json /data/ COPY composer.lock /data/ RUN composer self-update --no-interaction -RUN COMPOSER_ALLOW_SUPERUSER=1 composer install --prefer-dist --no-interaction --no-dev --optimize-autoloader --no-scripts --no-progress +RUN COMPOSER_ALLOW_SUPERUSER=1 composer install $COMPOSER_FLAGS ENV SSP_PATH /data/vendor/simplesamlphp/simplesamlphp diff --git a/docker-compose.yml b/docker-compose.yml index 0e1c324c..945bc54c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,7 +19,10 @@ services: PMA_PASSWORD: silauth test: - build: . + build: + context: . + args: + COMPOSER_FLAGS: "--no-interaction --no-progress" depends_on: - ssp-hub.local - ssp-idp1.local diff --git a/dockerbuild/run-integration-tests.sh b/dockerbuild/run-integration-tests.sh index b3d92545..61c751f7 100755 --- a/dockerbuild/run-integration-tests.sh +++ b/dockerbuild/run-integration-tests.sh @@ -7,7 +7,6 @@ set -x set -e cd /data -export COMPOSER_ALLOW_SUPERUSER=1; composer install whenavail "ssp-hub.local" 80 15 echo Hub ready whenavail "ssp-idp1.local" 80 5 echo IDP 1 ready diff --git a/dockerbuild/run-metadata-tests.sh b/dockerbuild/run-metadata-tests.sh index f052741c..d971eda7 100755 --- a/dockerbuild/run-metadata-tests.sh +++ b/dockerbuild/run-metadata-tests.sh @@ -7,6 +7,5 @@ set -x set -e cd /data -export COMPOSER_ALLOW_SUPERUSER=1; composer install ./vendor/bin/phpunit -v tests/MetadataTest.php