Skip to content

Commit

Permalink
use a new Docker arg to control composer install command flags
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Jun 4, 2024
1 parent f5b8856 commit fa4cc40
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion dockerbuild/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion dockerbuild/run-metadata-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ set -x
set -e

cd /data
export COMPOSER_ALLOW_SUPERUSER=1; composer install

./vendor/bin/phpunit -v tests/MetadataTest.php

0 comments on commit fa4cc40

Please sign in to comment.