Public | Automated Build

Last pushed: 2 years ago
Short Description
Short description is empty for this repo.
Full Description

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
    
Docker Pull Command
Owner
denisura
Source Repository