title: Gitlab-CI PHP executable returning error code 255
body: <p>I recently set up GitLab-CI in my self-hosted GitLab CE instance. I created one runner for a specific project and one shared runner.</p>
  
  <p>My <code>/etc/gitlab-runner/config.toml</code> is following:</p>
  
  <pre><code>concurrent = 1
  check_interval = 0
  
  [[runners]]
    name = "project runner"
    url = "https://gitlab.domain.com/ci"
    token = "SECRET"
    executor = "docker"
    [runners.docker]
      tls_verify = false
      image = "geertw/docker-php-ci:7.0-no-xdebug"
      privileged = false
      disable_cache = false
      volumes = ["/cache"]
      shm_size = 0
    [runners.cache]
  
  [[runners]]
    name = "shared runner"
    url = "https://gitlab.domain.com"
    token = "SECRET"
    executor = "docker"
    [runners.docker]
      tls_verify = false
      image = "geertw/docker-php-ci:7.0-no-xdebug"
      privileged = false
      disable_cache = false
      volumes = ["/cache"]
      shm_size = 0
    [runners.cache]
  </code></pre>
  
  <p>Then I added custom scripts to my <code>composer.json</code> file:</p>
  
  <pre><code>...
  
  "scripts": {
      "build": [
          "@composer install --no-progress --no-interaction --no-suggest",
          "@lint"
      ],
      "lint": "php -d display_errors -d display_startup_errors ./vendor/bin/parallel-lint --exclude vendor ."
  }
  </code></pre>
  
  <p>And the script is part of my <code>.gitlab-ci.yml</code> file:</p>
  
  <pre><code>before_script:
    - php -v
  
  services:
    - mysql:latest
  
  variables:
    MYSQL_DATABASE: "database"
    MYSQL_ROOT_PASSWORD: "password"
  
  build:7.0:
    image: geertw/docker-php-ci:7.0
    script:
      - composer build
      - php vendor/bin/phpunit --coverage-text --colors=never
  
  build:7.1:
    image: geertw/docker-php-ci:7.1-no-xdebug
    script:
      - composer build
  
  cache:
    paths:
      - vendor/
  </code></pre>
  
  <p>When I execute the pipeline in GitLab, I receive an error:</p>
  
  <pre><code>&gt; php -d display_errors -d display_startup_errors ./vendor/bin/parallel-lint --exclude vendor .
  Script php -d display_errors -d display_startup_errors ./vendor/bin/parallel-lint --exclude vendor . handling the lint event returned with error code 255
  ERROR: Job failed: exit code 1
  </code></pre>
  
  <p>Now when I run <code>composer lint</code> locally, it works as expected. I also tried to comment it out and I receive the same error with PHPUnit (build:7.0 in .gitlab-ci.yml). For debugging reasons I added <code>php -d</code> to display errors, yet nothing is shown.</p>
  
  <p>The other (private) pipeline works as expected for a smaller project that has exactly the same <code>.gitlab-ci.yml</code> file. I also tried switching from one runner to another but it doesn't work on either.</p>
  
  <p>Since I am new to docker and CI in general, I have little knowledge on how to debug this situation properly, perhaps increase php memory_limit
  in some way or output errors to stderr.</p>
  
  <p>Any ideas?</p>