S
S
Steve2021-09-03 11:04:57
Continuous Integration
Steve, 2021-09-03 11:04:57

Why does it work with docker but not with docker+machine?

If in gitlab-runner I set docker + machine as the executor, and not docker (because I use docker in the project), do I need to change something in the .gitlab-ci configuration?

I ask because with the docker+machine executor (since I need to set up spot instances), my tests do not work: they give an error in the pepline. And with a simple docker everything works fine

Here is my .gitlab-ci

image: php:7.4

# Cache libraries in between jobs
cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
    - vendor/

before_script:
  - apt-get update -yqq
  - apt-get install -yqq git libzip-dev libmcrypt-dev libpq-dev libcurl4-gnutls-dev libicu-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev
  # Install PHP extensions
  - docker-php-ext-install exif pdo_pgsql pgsql curl json intl gd xml zip bz2 opcache
  # Install & enable Xdebug for code coverage reports
  - pecl install xdebug
  - docker-php-ext-enable xdebug
  # Install and run Composer
  - curl --show-error --silent "https://getcomposer.org/installer" | php
  - php composer.phar install

UnitTest:
  script:
    - phpdbg -d memory_limit=-1 -qrr vendor/bin/phpunit --config=phpunit.xml.dist
    - XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-text --colors=never --configuration phpunit.xml.dist



I ask for your help!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question