Run PHP Mess Detector (php-cs) in Docker container-fixer
Build from Dockerfile:
docker build -t fredericomartini/php-cs-fixer .Verify build:
docker run --rm -it fredericomartini/php-cs-fixer --version- Install the
fredericomartini/php-cs-fixercontainer (optional - this step is performed by Docker automatically when running the container):
$ docker pull fredericomartini/php-cs-fixer- Define an bash alias that runs this container whenever
php-cs-fixeris invoked on the command line:
$ echo "alias php-cs='docker run --rm -it -v \$(pwd):/app fredericomartini/php-cs-fixer'" >> ~/.bashrc
$ source ~/.bashrc- Run php-cs-fixer as always:
$ php-cs-fixer --version-fixer