diff --git a/Makefile b/Makefile index 167669e6..d349e98a 100644 --- a/Makefile +++ b/Makefile @@ -4,16 +4,26 @@ blueprint: ## Generate all blueprints file @sed -i '1i\# DO NOT EDIT THIS FILE : Make yours changes in /utils/Dockerfile.*.blueprint)' Dockerfile.* @sed -i '1i\[DO NOT EDIT THIS FILE]: <> (Make yours changes in /utils/README.blueprint.md)' README.md -test-latest: test-php8.0 ## Test the latest build only +test-latest: test-8.0 ## Test the latest build only -test-php8.1: blueprint ## Test php8.1 build only - PHP_VERSION=8.1 BRANCH=v4 VARIANT=apache ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) +_test-prerequisites: blueprint + docker pull ubuntu:20.04 + +test-quick: _test-prerequisites ## Test 8.0 and 8.1 quickly + PHP_VERSION=8.0 BRANCH=v4 VARIANT=cli ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) PHP_VERSION=8.1 BRANCH=v4 VARIANT=cli ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) notify-send -u critical "Tests passed with success" -test-php8.0: blueprint ## Test php8.0 build only - PHP_VERSION=8.0 BRANCH=v4 VARIANT=apache ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) +test-8.1: _test-prerequisites ## Test php8.1 build only + docker pull ubuntu:20.04 + PHP_VERSION=8.1 BRANCH=v4 VARIANT=cli ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) + PHP_VERSION=8.1 BRANCH=v4 VARIANT=apache ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) + notify-send -u critical "Tests passed with success" + +test-8.0: _test-prerequisites ## Test php8.0 build only + docker pull ubuntu:20.04 PHP_VERSION=8.0 BRANCH=v4 VARIANT=cli ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) + PHP_VERSION=8.0 BRANCH=v4 VARIANT=apache ./build-and-test.sh || (notify-send -u critical "Tests failed" && exit 1) notify-send -u critical "Tests passed with success" clean: ## Clean dangles image after build diff --git a/README.md b/README.md index 0801df23..4eb0abcb 100644 --- a/README.md +++ b/README.md @@ -22,24 +22,24 @@ This repository contains a set of developer-friendly, general purpose PHP images | Name | PHP version | type |variant | NodeJS version | Size |-------------------------------------------------------------------------|------------------------------|------|--------|-----------------|------ -| [thecodingmachine/php:8.1-v4-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache) | `8.1.x`rc | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-apache.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-apache) -| [thecodingmachine/php:8.1-v4-apache-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node10) | `8.1.x`rc | fat | apache | `10.x`(2) | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-apache-node10.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-apache-node10) -| [thecodingmachine/php:8.1-v4-apache-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node12) | `8.1.x`rc | fat | apache | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-apache-node12.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-apache-node12) -| [thecodingmachine/php:8.1-v4-apache-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node14) | `8.1.x`rc | fat | apache | `14.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-apache-node14.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-apache-node14) -| [thecodingmachine/php:8.1-v4-apache-node16](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node16) | `8.1.x`rc | fat | apache | `16.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-apache-node16.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-apache-node16) -| [thecodingmachine/php:8.1-v4-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm) | `8.1.x`rc | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-fpm) -| [thecodingmachine/php:8.1-v4-fpm-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node10) | `8.1.x`rc | fat | fpm | `10.x`(2) | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-fpm-node10.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-fpm-node10) -| [thecodingmachine/php:8.1-v4-fpm-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node12) | `8.1.x`rc | fat | fpm | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-fpm-node12.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-fpm-node12) -| [thecodingmachine/php:8.1-v4-fpm-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node14) | `8.1.x`rc | fat | fpm | `14.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-fpm-node14.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-fpm-node14) -| [thecodingmachine/php:8.1-v4-fpm-node16](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node16) | `8.1.x`rc | fat | fpm | `16.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-fpm-node16.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-fpm-node16) -| [thecodingmachine/php:8.1-v4-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli) | `8.1.x`rc | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-cli.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-cli) -| [thecodingmachine/php:8.1-v4-cli-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node10) | `8.1.x`rc | fat | cli | `10.x`(2) | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-cli-node10.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-cli-node10) -| [thecodingmachine/php:8.1-v4-cli-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node12) | `8.1.x`rc | fat | cli | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-cli-node12.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-cli-node12) -| [thecodingmachine/php:8.1-v4-cli-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node14) | `8.1.x`rc | fat | cli | `14.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-cli-node14.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-cli-node14) -| [thecodingmachine/php:8.1-v4-cli-node16](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node16) | `8.1.x`rc | fat | cli | `16.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-cli-node16.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-cli-node16) -| [thecodingmachine/php:8.1-v4-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.apache) | `8.1.x`rc | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-slim-apache) -| [thecodingmachine/php:8.1-v4-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.fpm) | `8.1.x`rc | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-slim-fpm) -| [thecodingmachine/php:8.1-v4-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.cli) | `8.1.x`rc | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-slim-cli) +| [thecodingmachine/php:8.1-v4-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache) | `8.1.x` | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-apache.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-apache) +| [thecodingmachine/php:8.1-v4-apache-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node10) | `8.1.x` | fat | apache | `10.x`(2) | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-apache-node10.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-apache-node10) +| [thecodingmachine/php:8.1-v4-apache-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node12) | `8.1.x` | fat | apache | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-apache-node12.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-apache-node12) +| [thecodingmachine/php:8.1-v4-apache-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node14) | `8.1.x` | fat | apache | `14.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-apache-node14.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-apache-node14) +| [thecodingmachine/php:8.1-v4-apache-node16](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node16) | `8.1.x` | fat | apache | `16.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-apache-node16.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-apache-node16) +| [thecodingmachine/php:8.1-v4-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm) | `8.1.x` | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-fpm) +| [thecodingmachine/php:8.1-v4-fpm-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node10) | `8.1.x` | fat | fpm | `10.x`(2) | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-fpm-node10.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-fpm-node10) +| [thecodingmachine/php:8.1-v4-fpm-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node12) | `8.1.x` | fat | fpm | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-fpm-node12.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-fpm-node12) +| [thecodingmachine/php:8.1-v4-fpm-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node14) | `8.1.x` | fat | fpm | `14.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-fpm-node14.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-fpm-node14) +| [thecodingmachine/php:8.1-v4-fpm-node16](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node16) | `8.1.x` | fat | fpm | `16.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-fpm-node16.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-fpm-node16) +| [thecodingmachine/php:8.1-v4-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli) | `8.1.x` | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-cli.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-cli) +| [thecodingmachine/php:8.1-v4-cli-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node10) | `8.1.x` | fat | cli | `10.x`(2) | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-cli-node10.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-cli-node10) +| [thecodingmachine/php:8.1-v4-cli-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node12) | `8.1.x` | fat | cli | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-cli-node12.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-cli-node12) +| [thecodingmachine/php:8.1-v4-cli-node14](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node14) | `8.1.x` | fat | cli | `14.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-cli-node14.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-cli-node14) +| [thecodingmachine/php:8.1-v4-cli-node16](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node16) | `8.1.x` | fat | cli | `16.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-cli-node16.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-cli-node16) +| [thecodingmachine/php:8.1-v4-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.apache) | `8.1.x` | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-slim-apache) +| [thecodingmachine/php:8.1-v4-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.fpm) | `8.1.x` | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-slim-fpm) +| [thecodingmachine/php:8.1-v4-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.cli) | `8.1.x` | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.1-v4-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:8.1-v4-slim-cli) | [thecodingmachine/php:8.0-v4-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache) | `8.0.x` | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-apache.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-apache) | [thecodingmachine/php:8.0-v4-apache-node10](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node10) | `8.0.x` | fat | apache | `10.x`(2) | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-apache-node10.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-apache-node10) | [thecodingmachine/php:8.0-v4-apache-node12](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node12) | `8.0.x` | fat | apache | `12.x` | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:8.0-v4-apache-node12.svg)](https://microbadger.com/images/thecodingmachine/php:8.0-v4-apache-node12) @@ -187,8 +187,8 @@ Below is a list of extensions available in this image: - *mcrypt* is not available anymore in PHP 7.3+ - *weakref* is not compatible with PHP 7.3+ (but weak references were added to the PHP core in PHP 7.4) - *sybase* extension is not available in v4 (use v3) -- *event*, *gnupg*, *uploadprogress*, *xmlrpc* are not available in PHP 8.0+ -- *amqp*, *apcu*, *ast*, *blackfire*, *ds*, *gettext*, *grpc*, *ev*, *igbinary*, *imagick*, *mailparse*, *memcached*, *mongodb*, *msgpack*, *mysqli*, *pcov*, *rdkafka*, *redis*, *swoole*, *uploadprogress*, *uuid*, *yaml* are not available in PHP 8.1+ (RC) +- *event*, *gnupg* are not available in PHP 8.0+ +- *blackfire*, *gettext*, *ev*, *rdkafka*, *swoole* are not available in PHP 8.1+ ### Enabling/disabling extensions in the fat image diff --git a/build-and-test.sh b/build-and-test.sh index e9bd96ef..5f5938f5 100755 --- a/build-and-test.sh +++ b/build-and-test.sh @@ -10,14 +10,14 @@ failure() { trap 'failure ${LINENO} "$BASH_COMMAND"' ERR # Let's replace the "." by a "-" with some bash magic -export BRANCH_VARIANT=`echo "$VARIANT" | sed 's/\./-/g'` +export BRANCH_VARIANT="${VARIANT//./-}" # Build with BuildKit https://docs.docker.com/develop/develop-images/build_enhancements/ -export DOCKER_BUILDKIT=1 # Force use of BuildKit -export BUILDKIT_STEP_LOG_MAX_SIZE=10485760 # outpout log limit fixed to 10MiB +export DOCKER_BUILDKIT=1 # Force use of BuildKit +export BUILDKIT_STEP_LOG_MAX_SIZE=10485760 # output log limit fixed to 10MiB # Let's build the "slim" image. -docker build -t thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} --build-arg PHP_VERSION=${PHP_VERSION} --build-arg GLOBAL_VERSION=${BRANCH} -f Dockerfile.slim.${VARIANT} . +docker build -t "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" --build-arg PHP_VERSION="${PHP_VERSION}" --build-arg GLOBAL_VERSION="${BRANCH}" -f "Dockerfile.slim.${VARIANT}" . # Post build unit tests @@ -36,17 +36,17 @@ docker rmi test/slim_onbuild_composer # Post build unit tests if [[ $VARIANT == cli* ]]; then CONTAINER_CWD=/usr/src/app; else CONTAINER_CWD=/var/www/html; fi # Default user is 1000 -RESULT=`docker run --rm thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} id -ur` -[[ "$RESULT" = "1000" ]] +RESULT="$(docker run --rm "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" id -ur)" +[[ "$RESULT" == "1000" ]] # If mounted, default user has the id of the mount directory mkdir user1999 && docker run --rm -v "$(pwd)":/mnt busybox chown 1999:1999 /mnt/user1999 ls -al user1999 -RESULT=`docker run --rm -v "$(pwd)"/user1999:$CONTAINER_CWD thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} id -ur` -[[ "$RESULT" = "1999" ]] +RESULT="$(docker run --rm -v "$(pwd)"/user1999:$CONTAINER_CWD "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" id -ur)" +[[ "$RESULT" == "1999" ]] # Also, the default user can write on stdout and stderr -docker run --rm -v "$(pwd)"/user1999:$CONTAINER_CWD thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} bash -c "echo TEST > /proc/self/fd/2" +docker run --rm -v "$(pwd)"/user1999:$CONTAINER_CWD "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" bash -c "echo TEST > /proc/self/fd/2" rm -rf user1999 @@ -55,135 +55,133 @@ mkdir -p user33 cp tests/apache/composer.json user33/ docker run --rm -v "$(pwd)":/mnt busybox chown -R 33:33 /mnt/user33 ls -al user33 -RESULT=`docker run --rm -v "$(pwd)"/user33:$CONTAINER_CWD thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} id -ur` -[[ "$RESULT" = "33" ]] -RESULT=`docker run --rm -v "$(pwd)"/user33:$CONTAINER_CWD thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} composer update -vvv` +RESULT="$(docker run --rm -v "$(pwd)"/user33:$CONTAINER_CWD "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" id -ur)" +[[ "$RESULT" == "33" ]] +RESULT="$(docker run --rm -v "$(pwd)"/user33:$CONTAINER_CWD "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" composer update -vvv)" docker run --rm -v "$(pwd)":/mnt busybox rm -rf /mnt/user33 # Let's check that mbstring is enabled by default (they are compiled in PHP) -docker run --rm thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} php -m | grep mbstring -docker run --rm thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} php -m | grep PDO -#docker run --rm thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} php -m | grep pdo_sqlite +docker run --rm "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" php -m | grep mbstring +docker run --rm "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" php -m | grep PDO +#docker run --rm "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" php -m | grep pdo_sqlite if [[ $VARIANT == apache* ]]; then - # Test if environment variables are passed to PHP - DOCKER_CID=`docker run --rm -e MYVAR=foo -p "81:80" -d -v "$(pwd)":/var/www/html thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}` - - # Let's wait for Apache to start - sleep 5 - - RESULT=`curl http://localhost:81/tests/test.php` - [[ "$RESULT" = "foo" ]] - docker stop $DOCKER_CID - - - # Test Apache document root (relative) - DOCKER_CID=`docker run --rm -e MYVAR=foo -p "81:80" -d -v "$(pwd)":/var/www/html -e APACHE_DOCUMENT_ROOT=tests thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}` - # Let's wait for Apache to start - sleep 5 - RESULT=`curl http://localhost:81/test.php` - [[ "$RESULT" = "foo" ]] - docker stop $DOCKER_CID - - # Test Apache document root (absolute) - DOCKER_CID=`docker run --rm -e MYVAR=foo -p "81:80" -d -v "$(pwd)":/var/www/foo -e APACHE_DOCUMENT_ROOT=/var/www/foo/tests thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}` - # Let's wait for Apache to start - sleep 5 - RESULT=`curl http://localhost:81/test.php` - [[ "$RESULT" = "foo" ]] - docker stop $DOCKER_CID - - # Test Apache HtAccess - DOCKER_CID=`docker run --rm -p "81:80" -d -v "$(pwd)"/tests/testHtAccess:/foo -e APACHE_DOCUMENT_ROOT=/foo thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}` - # Let's wait for Apache to start - sleep 5 - RESULT=`curl http://localhost:81/` - [[ "$RESULT" = "foo" ]] - docker stop $DOCKER_CID - - # Test PHP_INI_... variables are correctly handled by apache - DOCKER_CID=`docker run --rm -e MYVAR=foo -p "81:80" -d -v "$(pwd)":/var/www/html -e PHP_INI_MEMORY_LIMIT=2G thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}` - # Let's wait for Apache to start - sleep 5 - RESULT=`curl http://localhost:81/tests/apache/echo_memory_limit.php` - [[ "$RESULT" = "2G" ]] - docker stop $DOCKER_CID + # Test if environment variables are passed to PHP + DOCKER_CID="$(docker run --rm -e MYVAR=foo -p "81:80" -d -v "$(pwd)":/var/www/html "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}")" + + # Let's wait for Apache to start + sleep 5 + + RESULT="$(curl http://localhost:81/tests/test.php)" + [[ "$RESULT" == "foo" ]] + docker stop "$DOCKER_CID" + + # Test Apache document root (relative) + DOCKER_CID="$(docker run --rm -e MYVAR=foo -p "81:80" -d -v "$(pwd)":/var/www/html -e APACHE_DOCUMENT_ROOT=tests "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}")" + # Let's wait for Apache to start + sleep 5 + RESULT="$(curl http://localhost:81/test.php)" + [[ "$RESULT" == "foo" ]] + docker stop "$DOCKER_CID" + + # Test Apache document root (absolute) + DOCKER_CID="$(docker run --rm -e MYVAR=foo -p "81:80" -d -v "$(pwd)":/var/www/foo -e APACHE_DOCUMENT_ROOT=/var/www/foo/tests "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}")" + # Let's wait for Apache to start + sleep 5 + RESULT="$(curl http://localhost:81/test.php)" + [[ "$RESULT" == "foo" ]] + docker stop "$DOCKER_CID" + + # Test Apache HtAccess + DOCKER_CID="$(docker run --rm -p "81:80" -d -v "$(pwd)"/tests/testHtAccess:/foo -e APACHE_DOCUMENT_ROOT=/foo "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}")" + # Let's wait for Apache to start + sleep 5 + RESULT="$(curl http://localhost:81/)" + [[ "$RESULT" == "foo" ]] + docker stop "$DOCKER_CID" + + # Test PHP_INI_... variables are correctly handled by apache + DOCKER_CID="$(docker run --rm -e MYVAR=foo -p "81:80" -d -v "$(pwd)":/var/www/html -e PHP_INI_MEMORY_LIMIT=2G "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}")" + # Let's wait for Apache to start + sleep 5 + RESULT="$(curl http://localhost:81/tests/apache/echo_memory_limit.php)" + [[ "$RESULT" == "2G" ]] + docker stop "$DOCKER_CID" fi if [[ $VARIANT == fpm* ]]; then - # Test if environment starts without errors - DOCKER_CID=`docker run --rm -p "9000:9000" -d -v "$(pwd)":/var/www/html thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}` + # Test if environment starts without errors + DOCKER_CID="$(docker run --rm -p "9000:9000" -d -v "$(pwd)":/var/www/html "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}")" - # Let's wait for FPM to start - sleep 5 + # Let's wait for FPM to start + sleep 5 - # If the container is still up, it will not fail when stopping. - docker stop $DOCKER_CID + # If the container is still up, it will not fail when stopping. + docker stop "$DOCKER_CID" fi # Let's check that the access to cron will fail with a message set +e -RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="(>&1 echo "foobar")" thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} sleep 1 2>&1 | grep -o 'Cron is not available in this image'` +RESULT="$(docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="(>&1 echo 'foobar')" "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" sleep 1 2>&1 | grep -o 'Cron is not available in this image')" set -e -[[ "$RESULT" = "Cron is not available in this image" ]] +[[ "$RESULT" == "Cron is not available in this image" ]] # Let's check that the configuration is loaded from the correct php.ini (development, production or imported in the image) -RESULT=`docker run --rm thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} php -i | grep error_reporting` -[[ "$RESULT" = "error_reporting => 32767 => 32767" ]] +RESULT="$(docker run --rm "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" php -i | grep error_reporting)" +[[ "$RESULT" == "error_reporting => 32767 => 32767" ]] -RESULT=`docker run --rm -e TEMPLATE_PHP_INI=production thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} php -i | grep error_reporting` -[[ "$RESULT" = "error_reporting => 22527 => 22527" ]] +RESULT="$(docker run --rm -e TEMPLATE_PHP_INI=production "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" php -i | grep error_reporting)" +[[ "$RESULT" == "error_reporting => 22527 => 22527" ]] -RESULT=`docker run --rm -v "$(pwd)"/tests/php.ini:/etc/php/${PHP_VERSION}/cli/php.ini thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} php -i | grep error_reporting` -[[ "$RESULT" = "error_reporting => 24575 => 24575" ]] +RESULT="$(docker run --rm -v "$(pwd)/tests/php.ini:/etc/php/${PHP_VERSION}/cli/php.ini" "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" php -i | grep error_reporting)" +[[ "$RESULT" == "error_reporting => 24575 => 24575" ]] -RESULT=`docker run --rm -e PHP_INI_ERROR_REPORTING="E_ERROR | E_WARNING" thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} php -i | grep error_reporting` -[[ "$RESULT" = "error_reporting => 3 => 3" ]] +RESULT="$(docker run --rm -e PHP_INI_ERROR_REPORTING="E_ERROR | E_WARNING" "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" php -i | grep error_reporting)" +[[ "$RESULT" == "error_reporting => 3 => 3" ]] # Tests that environment variables with an equal sign are correctly handled -RESULT=`docker run --rm -e PHP_INI_SESSION__SAVE_PATH="tcp://localhost?auth=yourverycomplex\"passwordhere" thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} php -i | grep "session.save_path"` -[[ "$RESULT" = "session.save_path => tcp://localhost?auth=yourverycomplex\"passwordhere => tcp://localhost?auth=yourverycomplex\"passwordhere" ]] +RESULT="$(docker run --rm -e PHP_INI_SESSION__SAVE_PATH="tcp://localhost?auth=yourverycomplex\"passwordhere" "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" php -i | grep "session.save_path")" +[[ "$RESULT" == "session.save_path => tcp://localhost?auth=yourverycomplex\"passwordhere => tcp://localhost?auth=yourverycomplex\"passwordhere" ]] # Tests that the SMTP parameter is set in uppercase -RESULT=`docker run --rm -e PHP_INI_SMTP="192.168.0.1" thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} php -i | grep "^SMTP"` -[[ "$RESULT" = "SMTP => 192.168.0.1 => 192.168.0.1" ]] +RESULT="$(docker run --rm -e PHP_INI_SMTP="192.168.0.1" "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" php -i | grep "^SMTP")" +[[ "$RESULT" == "SMTP => 192.168.0.1 => 192.168.0.1" ]] # Tests that environment variables are passed to startup scripts when UID is set -RESULT=`docker run --rm -e FOO="bar" -e STARTUP_COMMAND_1="env" -e UID=0 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} sleep 1 | grep "FOO"` -[[ "$RESULT" = "FOO=bar" ]] +RESULT="$(docker run --rm -e FOO="bar" -e STARTUP_COMMAND_1="env" -e UID=0 "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" sleep 1 | grep "FOO")" +[[ "$RESULT" == "FOO=bar" ]] # Tests that multi-commands are correctly executed when UID is set -RESULT=`docker run --rm -e STARTUP_COMMAND_1="cd / && whoami" -e UID=0 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} sleep 1` -[[ "$RESULT" = "root" ]] +RESULT="$(docker run --rm -e STARTUP_COMMAND_1="cd / && whoami" -e UID=0 "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" sleep 1)" +[[ "$RESULT" == "root" ]] # Tests that startup.sh is correctly executed -docker run --rm -v "$(pwd)"/tests/startup.sh:/etc/container/startup.sh thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} php -m | grep "startup.sh executed" +docker run --rm -v "$(pwd)"/tests/startup.sh:/etc/container/startup.sh "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" php -m | grep "startup.sh executed" # Tests that disable_functions is commented in php.ini cli -RESULT=`docker run --rm thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT} php -i | grep "disable_functions"` -[[ "$RESULT" = "disable_functions => no value => no value" ]] +RESULT="$(docker run --rm "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-slim-${BRANCH_VARIANT}" php -i | grep "disable_functions")" +[[ "$RESULT" == "disable_functions => no value => no value" ]] ################################# # Let's build the "fat" image ################################# -docker build -t thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} --build-arg PHP_VERSION=${PHP_VERSION} --build-arg GLOBAL_VERSION=${BRANCH} -f Dockerfile.${VARIANT} . +docker build -t "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}" --build-arg PHP_VERSION="${PHP_VERSION}" --build-arg GLOBAL_VERSION="${BRANCH}" -f "Dockerfile.${VARIANT}" . # Let's check that the crons are actually sending logs in the right place -RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="(>&1 echo "foobar")" thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} sleep 1 2>&1 | grep -oP 'msg=foobar' | head -n1` -[[ "$RESULT" = "msg=foobar" ]] +RESULT="$(docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="(>&1 echo 'foobar')" "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}" sleep 1 2>&1 | grep -oP 'msg=foobar' | head -n1)" +[[ "$RESULT" == "msg=foobar" ]] -RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="(>&2 echo "error")" thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} sleep 1 2>&1 | grep -oP 'msg=error' | head -n1` -[[ "$RESULT" = "msg=error" ]] +RESULT="$(docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="(>&2 echo 'error')" "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}" sleep 1 2>&1 | grep -oP 'msg=error' | head -n1)" +[[ "$RESULT" == "msg=error" ]] # Let's check that the cron with a user different from root is actually run. -RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="whoami" -e CRON_USER_1="docker" thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} sleep 1 2>&1 | grep -oP 'msg=docker' | head -n1` -[[ "$RESULT" = "msg=docker" ]] +RESULT="$(docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="whoami" -e CRON_USER_1="docker" "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}" sleep 1 2>&1 | grep -oP 'msg=docker' | head -n1)" +[[ "$RESULT" == "msg=docker" ]] # Let's check that 2 commands split with a ; are run by the same user. -RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="whoami;whoami" -e CRON_USER_1="docker" thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} sleep 1 2>&1 | grep -oP 'msg=docker' | wc -l` +RESULT="$(docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="whoami;whoami" -e CRON_USER_1="docker" "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}" sleep 1 2>&1 | grep -oP 'msg=docker' | wc -l)" [[ "$RESULT" -gt "1" ]] - # Let's check that mbstring cannot extension cannot be disabled # Disabled because no more used in setup_extensions.php #set +e @@ -192,21 +190,21 @@ RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="wh #set -e # Let's check that the "xdebug.client_host" contains a value different from "no value" -docker run --rm -e PHP_EXTENSION_XDEBUG=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.client_host| grep -v "no value" +docker run --rm -e PHP_EXTENSION_XDEBUG=1 "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}" php -i | grep xdebug.client_host | grep -v "no value" # Let's check that "xdebug.mode" is set to "debug" by default -docker run --rm -e PHP_EXTENSION_XDEBUG=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.mode| grep "debug" +docker run --rm -e PHP_EXTENSION_XDEBUG=1 "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}" php -i | grep xdebug.mode | grep "debug" # Let's check that "xdebug.mode" is properly overridden -docker run --rm -e PHP_EXTENSION_XDEBUG=1 -e PHP_INI_XDEBUG__MODE=debug,coverage thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.mode| grep "debug,coverage" +docker run --rm -e PHP_EXTENSION_XDEBUG=1 -e PHP_INI_XDEBUG__MODE=debug,coverage "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}" php -i | grep xdebug.mode | grep "debug,coverage" if [[ "${PHP_VERSION}" != "8.1" ]]; then # Tests that blackfire + xdebug will output an error - RESULT=`docker run --rm -e PHP_EXTENSION_XDEBUG=1 -e PHP_EXTENSION_BLACKFIRE=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -v 2>&1 | grep 'WARNING: Both Blackfire and Xdebug are enabled. This is not recommended as the PHP engine may not behave as expected. You should strongly consider disabling Xdebug or Blackfire.'` - [[ "$RESULT" = "WARNING: Both Blackfire and Xdebug are enabled. This is not recommended as the PHP engine may not behave as expected. You should strongly consider disabling Xdebug or Blackfire." ]] + RESULT="$(docker run --rm -e PHP_EXTENSION_XDEBUG=1 -e PHP_EXTENSION_BLACKFIRE=1 "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}" php -v 2>&1 | grep 'WARNING: Both Blackfire and Xdebug are enabled. This is not recommended as the PHP engine may not behave as expected. You should strongly consider disabling Xdebug or Blackfire.')" + [[ "$RESULT" == "WARNING: Both Blackfire and Xdebug are enabled. This is not recommended as the PHP engine may not behave as expected. You should strongly consider disabling Xdebug or Blackfire." ]] # Check that blackfire can be enabled - docker run --rm -e PHP_EXTENSION_BLACKFIRE=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -m | grep blackfire + docker run --rm -e PHP_EXTENSION_BLACKFIRE=1 "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}" php -m | grep blackfire fi # Let's check that the extensions are enabled when composer is run docker build -t test/composer_with_gd --build-arg PHP_VERSION="${PHP_VERSION}" --build-arg BRANCH="$BRANCH" --build-arg BRANCH_VARIANT="$BRANCH_VARIANT" tests/composer @@ -218,9 +216,9 @@ docker rmi test/composer_with_gd ################################# # Let's build the "node" images ################################# -docker build -t thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}-node10 --build-arg PHP_VERSION=${PHP_VERSION} --build-arg GLOBAL_VERSION=${BRANCH} -f Dockerfile.${VARIANT}.node10 . -docker build -t thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}-node12 --build-arg PHP_VERSION=${PHP_VERSION} --build-arg GLOBAL_VERSION=${BRANCH} -f Dockerfile.${VARIANT}.node12 . -docker build -t thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}-node14 --build-arg PHP_VERSION=${PHP_VERSION} --build-arg GLOBAL_VERSION=${BRANCH} -f Dockerfile.${VARIANT}.node14 . -docker build -t thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}-node16 --build-arg PHP_VERSION=${PHP_VERSION} --build-arg GLOBAL_VERSION=${BRANCH} -f Dockerfile.${VARIANT}.node16 . +docker build -t "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}-node10" --build-arg PHP_VERSION="${PHP_VERSION}" --build-arg GLOBAL_VERSION="${BRANCH}" -f "Dockerfile.${VARIANT}.node10" . +docker build -t "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}-node12" --build-arg PHP_VERSION="${PHP_VERSION}" --build-arg GLOBAL_VERSION="${BRANCH}" -f "Dockerfile.${VARIANT}.node12" . +docker build -t "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}-node14" --build-arg PHP_VERSION="${PHP_VERSION}" --build-arg GLOBAL_VERSION="${BRANCH}" -f "Dockerfile.${VARIANT}.node14" . +docker build -t "thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT}-node16" --build-arg PHP_VERSION="${PHP_VERSION}" --build-arg GLOBAL_VERSION="${BRANCH}" -f "Dockerfile.${VARIANT}.node16" . echo "Tests passed with success" diff --git a/extensions/8.0/mcrypt b/extensions/8.0/mcrypt new file mode 120000 index 00000000..c4321cdf --- /dev/null +++ b/extensions/8.0/mcrypt @@ -0,0 +1 @@ +../core/mcrypt-7.1 \ No newline at end of file diff --git a/extensions/8.0/uploadprogress b/extensions/8.0/uploadprogress new file mode 120000 index 00000000..6b4b74d0 --- /dev/null +++ b/extensions/8.0/uploadprogress @@ -0,0 +1 @@ +../core/uploadprogress \ No newline at end of file diff --git a/extensions/8.0/xmlrpc b/extensions/8.0/xmlrpc new file mode 120000 index 00000000..2833c799 --- /dev/null +++ b/extensions/8.0/xmlrpc @@ -0,0 +1 @@ +../core/xmlrpc \ No newline at end of file diff --git a/extensions/8.1/amqp b/extensions/8.1/amqp new file mode 120000 index 00000000..f66005fc --- /dev/null +++ b/extensions/8.1/amqp @@ -0,0 +1 @@ +../core/amqp \ No newline at end of file diff --git a/extensions/8.1/apcu b/extensions/8.1/apcu new file mode 120000 index 00000000..ddbb93d6 --- /dev/null +++ b/extensions/8.1/apcu @@ -0,0 +1 @@ +../core/apcu \ No newline at end of file diff --git a/extensions/8.1/ast b/extensions/8.1/ast new file mode 120000 index 00000000..5241c003 --- /dev/null +++ b/extensions/8.1/ast @@ -0,0 +1 @@ +../core/ast \ No newline at end of file diff --git a/extensions/8.1/ds b/extensions/8.1/ds new file mode 120000 index 00000000..edbe1af6 --- /dev/null +++ b/extensions/8.1/ds @@ -0,0 +1 @@ +../core/ds \ No newline at end of file diff --git a/extensions/8.1/grpc b/extensions/8.1/grpc new file mode 120000 index 00000000..57533a58 --- /dev/null +++ b/extensions/8.1/grpc @@ -0,0 +1 @@ +../core/grpc \ No newline at end of file diff --git a/extensions/8.1/igbinary b/extensions/8.1/igbinary new file mode 120000 index 00000000..c57a5ab9 --- /dev/null +++ b/extensions/8.1/igbinary @@ -0,0 +1 @@ +../core/igbinary \ No newline at end of file diff --git a/extensions/8.1/imagick b/extensions/8.1/imagick new file mode 120000 index 00000000..a55b99bc --- /dev/null +++ b/extensions/8.1/imagick @@ -0,0 +1 @@ +../core/imagick \ No newline at end of file diff --git a/extensions/8.1/mailparse b/extensions/8.1/mailparse new file mode 120000 index 00000000..e29c74c5 --- /dev/null +++ b/extensions/8.1/mailparse @@ -0,0 +1 @@ +../core/mailparse \ No newline at end of file diff --git a/extensions/8.1/memcached b/extensions/8.1/memcached new file mode 120000 index 00000000..13f2ea8c --- /dev/null +++ b/extensions/8.1/memcached @@ -0,0 +1 @@ +../core/memcached \ No newline at end of file diff --git a/extensions/8.1/mongodb b/extensions/8.1/mongodb new file mode 120000 index 00000000..7898c8e7 --- /dev/null +++ b/extensions/8.1/mongodb @@ -0,0 +1 @@ +../core/mongodb \ No newline at end of file diff --git a/extensions/8.1/msgpack b/extensions/8.1/msgpack new file mode 120000 index 00000000..2a72eaa8 --- /dev/null +++ b/extensions/8.1/msgpack @@ -0,0 +1 @@ +../core/msgpack \ No newline at end of file diff --git a/extensions/8.1/mysqli b/extensions/8.1/mysqli new file mode 120000 index 00000000..f752c283 --- /dev/null +++ b/extensions/8.1/mysqli @@ -0,0 +1 @@ +../core/mysqli \ No newline at end of file diff --git a/extensions/8.1/pcov b/extensions/8.1/pcov new file mode 120000 index 00000000..b99a0dd2 --- /dev/null +++ b/extensions/8.1/pcov @@ -0,0 +1 @@ +../core/pcov \ No newline at end of file diff --git a/extensions/8.1/redis b/extensions/8.1/redis new file mode 120000 index 00000000..0727c021 --- /dev/null +++ b/extensions/8.1/redis @@ -0,0 +1 @@ +../core/redis \ No newline at end of file diff --git a/extensions/8.1/uploadprogress b/extensions/8.1/uploadprogress new file mode 120000 index 00000000..6b4b74d0 --- /dev/null +++ b/extensions/8.1/uploadprogress @@ -0,0 +1 @@ +../core/uploadprogress \ No newline at end of file diff --git a/extensions/8.1/uuid b/extensions/8.1/uuid new file mode 120000 index 00000000..7a522046 --- /dev/null +++ b/extensions/8.1/uuid @@ -0,0 +1 @@ +../core/uuid \ No newline at end of file diff --git a/extensions/8.1/xmlrpc b/extensions/8.1/xmlrpc new file mode 120000 index 00000000..2833c799 --- /dev/null +++ b/extensions/8.1/xmlrpc @@ -0,0 +1 @@ +../core/xmlrpc \ No newline at end of file diff --git a/extensions/8.1/yaml b/extensions/8.1/yaml new file mode 120000 index 00000000..4be2658a --- /dev/null +++ b/extensions/8.1/yaml @@ -0,0 +1 @@ +../core/yaml \ No newline at end of file diff --git a/utils/README.blueprint.md b/utils/README.blueprint.md index 8d49d358..330b3e73 100644 --- a/utils/README.blueprint.md +++ b/utils/README.blueprint.md @@ -21,15 +21,15 @@ This repository contains a set of developer-friendly, general purpose PHP images | Name | PHP version | type |variant | NodeJS version | Size |-------------------------------------------------------------------------|------------------------------|------|--------|-----------------|------ -{{range $phpV := $versions}}| [thecodingmachine/php:{{ $phpV }}-v4-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }}{{ if eq $phpV "8.1" }}rc{{end}} | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-apache.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-apache) -{{range $nodeV := $nodeVersions}}| [thecodingmachine/php:{{ $phpV }}-v4-apache-node{{ $nodeV }}](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node{{ $nodeV }}) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }}{{ if eq $phpV "8.1" }}rc{{end}} | fat | apache | `{{ $nodeV }}.x`{{ if eq $nodeV "10" }}(2){{ end }} | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-apache-node{{ $nodeV }}.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-apache-node{{ $nodeV }}) -{{ end }}| [thecodingmachine/php:{{ $phpV }}-v4-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }}{{ if eq $phpV "8.1" }}rc{{end}} | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-fpm) -{{range $nodeV := $nodeVersions}}| [thecodingmachine/php:{{ $phpV }}-v4-fpm-node{{ $nodeV }}](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node{{ $nodeV }}) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }}{{ if eq $phpV "8.1" }}rc{{end}} | fat | fpm | `{{ $nodeV }}.x`{{ if eq $nodeV "10" }}(2){{ end }} | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-fpm-node{{ $nodeV }}.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-fpm-node{{ $nodeV }}) -{{ end }}| [thecodingmachine/php:{{ $phpV }}-v4-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }}{{ if eq $phpV "8.1" }}rc{{end}} | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-cli.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-cli) -{{range $nodeV := $nodeVersions}}| [thecodingmachine/php:{{ $phpV }}-v4-cli-node{{ $nodeV }}](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node{{ $nodeV }}) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }}{{ if eq $phpV "8.1" }}rc{{end}} | fat | cli | `{{ $nodeV }}.x`{{ if eq $nodeV "10" }}(2){{ end }} | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-cli-node{{ $nodeV }}.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-cli-node{{ $nodeV }}) -{{ end }}| [thecodingmachine/php:{{ $phpV }}-v4-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.apache) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }}{{ if eq $phpV "8.1" }}rc{{end}} | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-slim-apache) -| [thecodingmachine/php:{{ $phpV }}-v4-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.fpm) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }}{{ if eq $phpV "8.1" }}rc{{end}} | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-slim-fpm) -| [thecodingmachine/php:{{ $phpV }}-v4-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.cli) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }}{{ if eq $phpV "8.1" }}rc{{end}} | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-slim-cli) +{{range $phpV := $versions}}| [thecodingmachine/php:{{ $phpV }}-v4-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }} | fat | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-apache.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-apache) +{{range $nodeV := $nodeVersions}}| [thecodingmachine/php:{{ $phpV }}-v4-apache-node{{ $nodeV }}](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.apache.node{{ $nodeV }}) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }} | fat | apache | `{{ $nodeV }}.x`{{ if eq $nodeV "10" }}(2){{ end }} | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-apache-node{{ $nodeV }}.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-apache-node{{ $nodeV }}) +{{ end }}| [thecodingmachine/php:{{ $phpV }}-v4-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }} | fat | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-fpm) +{{range $nodeV := $nodeVersions}}| [thecodingmachine/php:{{ $phpV }}-v4-fpm-node{{ $nodeV }}](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.fpm.node{{ $nodeV }}) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }} | fat | fpm | `{{ $nodeV }}.x`{{ if eq $nodeV "10" }}(2){{ end }} | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-fpm-node{{ $nodeV }}.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-fpm-node{{ $nodeV }}) +{{ end }}| [thecodingmachine/php:{{ $phpV }}-v4-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }} | fat | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-cli.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-cli) +{{range $nodeV := $nodeVersions}}| [thecodingmachine/php:{{ $phpV }}-v4-cli-node{{ $nodeV }}](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.cli.node{{ $nodeV }}) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }} | fat | cli | `{{ $nodeV }}.x`{{ if eq $nodeV "10" }}(2){{ end }} | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-cli-node{{ $nodeV }}.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-cli-node{{ $nodeV }}) +{{ end }}| [thecodingmachine/php:{{ $phpV }}-v4-slim-apache](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.apache) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }} | slim | apache | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-slim-apache.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-slim-apache) +| [thecodingmachine/php:{{ $phpV }}-v4-slim-fpm](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.fpm) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }} | slim | fpm | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-slim-fpm.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-slim-fpm) +| [thecodingmachine/php:{{ $phpV }}-v4-slim-cli](https://github.com/thecodingmachine/docker-images-php/blob/v4/Dockerfile.slim.cli) | `{{ $phpV }}.x`{{if eq $phpV "7.2"}}(1){{ end }}{{if eq $phpV "7.3"}}(1){{ end }} | slim | cli | *N/A* | [![](https://images.microbadger.com/badges/image/thecodingmachine/php:{{ $phpV }}-v4-slim-cli.svg)](https://microbadger.com/images/thecodingmachine/php:{{ $phpV }}-v4-slim-cli) {{end}} * (1) [PHP 7.2 and 7.3 are end of life](https://www.php.net/supported-versions.php) @@ -105,8 +105,8 @@ Below is a list of extensions available in this image: - *mcrypt* is not available anymore in PHP 7.3+ - *weakref* is not compatible with PHP 7.3+ (but weak references were added to the PHP core in PHP 7.4) - *sybase* extension is not available in v4 (use v3) -- *event*, *gnupg*, *uploadprogress*, *xmlrpc* are not available in PHP 8.0+ -- *amqp*, *apcu*, *ast*, *blackfire*, *ds*, *gettext*, *grpc*, *ev*, *igbinary*, *imagick*, *mailparse*, *memcached*, *mongodb*, *msgpack*, *mysqli*, *pcov*, *rdkafka*, *redis*, *swoole*, *uploadprogress*, *uuid*, *yaml* are not available in PHP 8.1+ (RC) +- *event*, *gnupg* are not available in PHP 8.0+ +- *blackfire*, *gettext*, *ev*, *rdkafka*, *swoole* are not available in PHP 8.1+ ### Enabling/disabling extensions in the fat image