Sign inSign up

intellipharm/php-xdebug

By intellipharm

•Updated almost 6 years ago

Image
0

2.1K

intellipharm/php-xdebug repository overview

⁠Docker PHP xDebug

PHP with xDebug (for running PHPUnit) for DockerHub.

⁠Getting Started

This repo contains at least one branch used to auto-build docker images on DockerHub⁠.

  • 5.6 -> Builds image intellipharm/php-xdebug:5.6
  • 7.0 -> Builds image intellipharm/php-xdebug:7.0
  • 7.1 -> Builds image intellipharm/php-xdebug:7.1
  • 7.2 -> Builds image intellipharm/php-xdebug:7.2
  • 7.3 -> Builds image intellipharm/php-xdebug:7.3
  • 7.4 -> Builds image intellipharm/php-xdebug:7.4
  • 8.0 -> Builds image intellipharm/php-xdebug:8.0

⁠Usage

Build the xdebug container by switching to the correct branch, then build and tag based on the current branch

docker build -t intellipharm/php-xdebug:${BRANCH} .

Run PHPUnit

docker run --rm \
-v ${DIR}/api:/app \
-w /app intellipharm/php-xdebug:7.4 \
./vendor/bin/phpunit

Run PHPUnit with a different version of PHP

docker run --rm \
-v ${DIR}/api:/app \
-w /app intellipharm/php-xdebug:5.6 \
./vendor/bin/phpunit

Run PHPUnit with specific test suites

docker run --rm \
-v ${DIR}/api:/app \
-w /app intellipharm/php-xdebug:7.4 \
./vendor/bin/phpunit \
--testsuite "Functional,Unit"

Run PHPUnit with XML log

docker run --rm \
-v ${DIR}/api:/app \
-w /app intellipharm/php-xdebug:7.4 \
./vendor/bin/phpunit \
--log-junit storage/tests/phpunit-junit.xml

Run PHPUnit and generate Code Coverage Report

docker run --rm \
-v ${DIR}/api:/app \
-w /app intellipharm/php-xdebug:7.4 \
./vendor/bin/phpunit \
--coverage-html storage/tests/coverage/html \
--coverage-clover storage/tests/coverage/phpunit-clover.xml

Run PHPUnit with specific test suites and generate Code Coverage Report

docker run --rm \
-v ${DIR}/api:/app \
-w /app intellipharm/php-xdebug:7.4 \
./vendor/bin/phpunit \
--testsuite "Functional,Unit" \
--coverage-html storage/tests/coverage/html \
--coverage-clover storage/tests/coverage/phpunit-clover.xml

Run PHPUnit with specific test suites and generate Code Coverage Report with XML log

docker run --rm \
-v ${DIR}/api:/app \
-w /app intellipharm/php-xdebug:7.4 \
./vendor/bin/phpunit \
--testsuite "Functional,Unit" \
--coverage-html storage/tests/coverage/html \
--coverage-clover storage/tests/coverage/phpunit-clover.xml \
--log-junit storage/tests/phpunit-junit.xml

Access the bash shell

docker run -it intellipharm/php-xdebug:7.4 bash

Access the sh shell

docker run -it intellipharm/php-xdebug:7.4 sh

Tag summary

Content type

Image

Digest

Size

239 MB

Last updated

almost 6 years ago

docker pull intellipharm/php-xdebug:7.4