Answer the question
In order to leave comments, you need to log in
How is .gitlab-ci.yml properly configured for a docker project?
crashes on code-review
$ docker exec -t $(docker-compose ps -q php) ./vendor/bin/phpcs --extensions=php --standard=PSR2 ./
Error: No such container: ./vendor/bin/phpcs
image: docker:latest
services:
- docker:dind
before_script:
- apk add --no-cache python py2-pip
- pip install --no-cache-dir docker-compose==1.16.0
- cp env_dist .env
- chmod -R 777 docker/nginx/run_nginx.sh
- export APP_ENV=testing
stages:
- prepare
- testing
# - build
# - deploy
variables:
COMPOSER_CACHE_DIR: "/cache/composer"
DOCKER_DRIVER: overlay
installing-dependencies:
stage: prepare
tags:
- docker
script:
- docker info
- docker-compose up -d
- sleep 15
- docker exec -t $(docker-compose ps -q php) composer install --prefer-dist --optimize-autoloader -n --no-interaction -v --no-suggest
- docker exec -t $(docker-compose ps -q php) composer dump-autoload --optimize
artifacts:
name: "vendor"
untracked: true
expire_in: 60 mins
paths:
- $CI_PROJECT_DIR/vendor
code-review:
stage: testing
dependencies:
- installing-dependencies
script:
- docker exec -t $(docker-compose ps -q php) ./vendor/bin/phpcs --extensions=php --standard=PSR2 ./
Answer the question
In order to leave comments, you need to log in
docker-compose exec php ./vendor/bin/phpcs --extensions=php --standard=PSR2 ./
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question