node { docker.image("memcached:latest").withRun("-p 11212:11211") { c -> docker.image("redis:latest").withRun("-p 6380:6379") { d -> docker.image("php:7.4").withRun("-e REDIS_HOST=redis -e REDIS_PORT=11212 -e MEMCACHED_HOST=mem -e MEMCACHED_PORT=6380 --link ${d.id}:redis --link ${c.id}:mem") { p -> checkout scm sh "sh build/docker_install.sh > /dev/null" sh "curl -sS https://getcomposer.org/installer | php" sh "php composer.phar install --ignore-platform-reqs" sh "phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never" } docker.image("php:8").withRun("-e REDIS_HOST=redis -e REDIS_PORT=11212 -e MEMCACHED_HOST=mem -e MEMCACHED_PORT=6380 --link ${d.id}:redis --link ${c.id}:mem") { p -> checkout scm sh "sh build/docker_install.sh > /dev/null" sh "curl -sS https://getcomposer.org/installer | php" sh "php composer.phar install --ignore-platform-reqs" sh "phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never" } } } }