A Docker image designed for PHP developers that care about code quality.
Available on Docker Hub at devdrops/php-toolbox. Also check the whole content description at the MicroBadger.
From now on, I'll publish a image for every major version of PHP, where latest will be the most stable release at the moment.
Check each directory for more information regarding each version π
docker pull devdrops/php-toolboxFirst, clone this repo. Then, navigate to it's root source.
For development:
./developAll tools can be acessed by executing:
docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest CHOOSEN_BINARYWhere CHOOSEN_BINARY is the binary you're looking for π
You can run this image from whenever the folder you wish. But, just to give a few examples, consider the following structure for instance:
. βββ my-project βββ Abstract.php βββ bootstrap.php βββ composer.json βββ vendor All the commands below will be executed from the project's root folder, my-project.
docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest php -vdocker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest composer installdocker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest phpunit --versiondocker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest phpcs --standard=PSR2 Abstract.phpdocker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest php-cs-fixer fix Abstract.phpdocker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest phpmd Abstract.php text codesizedocker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest behat --versiondocker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest phploc --versiondocker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest phpstan --version