Used to create Docker images for running PHP_CodeSniffer tools (phpcs/phpcbf). http://pear.php.net/package/PHP_CodeSniffer
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Dockerfile
LICENSE
README.md

README.md

docker-phpcs

Used to create Docker images for running PHP_CodeSniffer tools (phpcs/phpcbf). http://pear.php.net/package/PHP_CodeSniffer

Build

Build from Dockerfile:

``` sh
sudo docker build --no-cache -t denisura/phpcs .
```

Verify build:

``` sh
sudo docker run --rm -it denisura/phpcs phpcs --version
sudo docker run --rm -it denisura/phpcs phpcbf --version
```

Usage

  1. Install the denisura/phpcs container (optional - this step is performed by Docker automatically when running the container):

    $ docker pull denisura/phpcs
  2. Define an bash alias that runs this container whenever composer is invoked on the command line:

    $ echo "alias phpcs='docker run --rm -it -v \$(pwd):/workspace denisura/phpcs phpcs'" >> ~/.bashrc
    $ echo "alias phpcbf='docker run --rm -it -v \$(pwd):/workspace denisura/phpcs phpcbf'" >> ~/.bashrc
    $ source ~/.bashrc
  3. Run composer as always:

    $ phpcs --version
    $ phpcbf --version