This is a simple docker image for running various PHP tools from the CLI / IDE.
Go to your regular directory root of your app and choose what to do
docker run -it --rm -w /app -v $(pwd):/app kingsquare/php-tools:latest /phpunit
docker run -it --rm -w /app -v $(pwd):/app kingsquare/php-tools:latest /phpcs
docker run -it --rm -w /app -v $(pwd):/app kingsquare/php-tools:latest /phpdoc
docker run -it --rm -w /app -v $(pwd):/app kingsquare/php-tools:latest /composer
XDebug is loaded so no need to worry :)
One handy trick is to create a few run commands for even easier use
i.e. ~/bin/phpunit
#!/bin/bash
docker run \
-it \
--rm \
-v $(pwd):/app \
-w /app \
kingsquare/php-tools:latest /phpunit $*
for the other tools, you could replace phpunit with composer, phpdoc or phpcs
One of the downsides of this way of using PHP tools is newly added files aren't owned by you. Thats something that leaves
to be desired. You could use the -u $(id -u) flag for the docker run command but that way the group of the
newly created files would still be root
In order to allow easier switching of the various tools between PHP versions. We've tagged the PHP version as the image tag.
Thus using php-tools:latest will use the latest PHP stable, but php-tools:5.4 will use 5.4 ;)
Please post an issue on the issuetracker!
Content type
Image
Digest
sha256:09340e230…
Size
145.3 MB
Last updated
almost 11 years ago
docker pull kingsquare/php-tools