PHP Code Sniffer container
Take a look at the phpcs homepage
The default ENTRYPOINT is phpcs
The default CMD parameters are --standard=PSR2 and /app
without adding anything it will run against the current directory (recursively) against the PSR2 standard
docker run -i \
--rm \
-v "$(pwd)":/app \
--name phpcs_"$(date +%s)" \
gruen/phpcs
you can override the defaults by passing any of the phpcs options
docker run -i \
--rm \
-v "$(pwd)":/app \
--name phpcs_"$(date +%s)" \
gruen/phpcs --standard=pear /app/src
You can create an alias with the following
docker run -i --rm \
-v "$(pwd)":/app \
--name phpcs_"$(date +%s%N)" \
gruen/phpcs "$@"
I use the "$(date +%s%N)" to prevent naming
conflicts when running multiple containers simultaneously
Content type
Image
Digest
Size
26.3 MB
Last updated
over 9 years ago
docker pull gruen/phpcs