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