I want to use this Docker image:
https://cloud.docker.com/u/steevanb/repository/docker/steevanb/php-code-sniffs
From this Dockerfile:
https://github.com/steevanb/docker-php-code-sniffs/blob/master/Dockerfile
Locally, i use it like that:
#!/bin/bash set -e readonly PROJECT_DIR=$(realpath $(dirname $(realpath $0))/..) docker run \ --rm \ -e PHPCS_PARAMETERS="--warning-severity=0 --ignore=/var/phpcs/var,/var/phpcs/vendor/" \ -e PHPCS_BOOTSTRAP=/var/phpcs.bootstrap.php \ -v ${PROJECT_DIR}:/var/phpcs:ro \ -v ${PROJECT_DIR}/phpcs.bootstrap.php:/var/phpcs.bootstrap.php:ro \ steevanb/php-code-sniffs:2.0.9 I don't understand how i can use it in Gitlab CI, with same parameters?
I've tried some things, like that:
phpcs: image: name: steevanb/php-code-sniffs:2.0.9 entrypoint: ["/var/steevanb/php-code-sniffs/vendor/bin/phpcs", "$CI_PROJECT_DIR/project/user/src"] # don't need it, everything is done by overloading entrypoint script: echo $CI_PROJECT_DIR But i have this error, seems $CI_PROJECT_DIR is not replaced with the expected value:
RROR: The file "$CI_PROJECT_DIR/project/user/src" does not exist.
docker run ...with Gitlab CI. I have a lot of errors when i try to do it, i can't write here all things i've tried it will be too long ;)