diff --git a/.github/workflows/test_buildx_and_publish.yml b/.github/workflows/test_buildx_and_publish.yml index 553ab0e..94de50d 100644 --- a/.github/workflows/test_buildx_and_publish.yml +++ b/.github/workflows/test_buildx_and_publish.yml @@ -34,17 +34,21 @@ jobs: -e PHP_INI-upload_max_filesize=20M \ -e PHP_EXTENSION_xhprof=1 \ moodle-php-apache - docker exec test0 php /var/www/html/test.php docker exec test0 php /var/www/html/check-ini.php docker exec test0 php /var/www/html/check-entrypoint-scripts.php - curl --fail http://127.0.0.1:8000/test.php - curl --fail http://127.0.0.1:8000/check-ini.php # Verify that CLI execution only includes the expected output (if we discard stderr). + echo zero + docker run --rm --name test1 moodle-php-apache php /var/www/html/check-stderr.php 2>/dev/null + echo one stdout=$(docker run --rm --name test1 moodle-php-apache php /var/www/html/check-stderr.php 2>/dev/null) + echo two [[ ${stdout} == "Hello World!" ]] && echo "OK" || echo "Fail" + echo three # Verify that stderr still contains information about the bootstrap. stdout=$(docker run --rm --name test1 moodle-php-apache php /var/www/html/check-stderr.php 2>&1) + echo four [[ ${stdout} =~ "Checking for php configuration" ]] && echo "OK" || echo "Fail" + echo five - name: Display container logs on failure if: failure() diff --git a/Dockerfile b/Dockerfile index cd3d71a..cdd1e2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,11 +24,6 @@ RUN apt-get update && apt-get install -y \ # For an example of php80-rc5 near complete, using pickle instead of pear/pecl, look to: # https://github.com/stronk7/moodle-php-apache/tree/8.0-buster-pickle-version -# Generate all the UTF-8 locales. -ARG DEBIAN_FRONTEND=noninteractive -ADD root/tmp/setup/locales-gen.sh /tmp/setup/locales-gen.sh -RUN /tmp/setup/locales-gen.sh - # Setup the required extensions. ADD root/tmp/setup/php-extensions.sh /tmp/setup/php-extensions.sh RUN /tmp/setup/php-extensions.sh