Docker container to install and run PHPUnit.
-
Install the phpunit/phpunit container:
$ docker pull phpunit/phpunit
-
Create a phpunit.xml defining your tests suites.
... ```
-
Run PHPUnit through the PHPUnit container:
$ docker run -v $(pwd):/app phpunit/phpunit run
To run, test and develop the PHPUnit Dockerfile itself, you must use the source directly:
-
Download the source:
$ git clone https://github.com/JulienBreux/phpunit-docker.git
-
Switch to the phpunit-docker directory:
$ cd phpunit-docker
-
Build the container:
$ docker build -t phpunit/phpunit .
-
Test running the container:
$ docker run phpunit/phpunit --help