I’ve been working with docker executors for a little while, but I barely understand how any of this works. This is a snippet of my circleci config.yml file that worked last summer to perform visual regression testing on a drupal web site, before a version bump threw everything off, and I stopped being able to get any part of the circleci config to work:
defaults: &defaults docker: - image: rhodeswebdev/cci-drupal-percy:v0.17 environment: XDEBUG_MODE: coverage - image: mariadb:10.4 environment: MYSQL_ALLOW_EMPTY_PASSWORD: 1
I finally got around to recreating the visual regression testing system, but for some reason composer fails to run for me now inside this docker image, locally or in the circleci system. It works on my local macbook pro; it works on our staging and production systems (composer install runs on the remote server every time I push changes); and via circleci email support, I’ve found that composer will run on a machine executor. But, I can’t figure out how to add a database image alongside the machine executor. In the process of creating this topic, I found this: Creating database for macos executor – which almost sounds like using a machine executor is basically the same as running a VPS; is that correct? Do I just use apt to install mariadb? That seems extremely inefficient.
In the snippet above, I was in the process of creating my own docker image that would have everything i needed (php, node, percy/api) pre-installed before trying to spin up a circleci environment to run the tests. That makes sense, but it does not make sense to use a Machine Executor if I have to install and configure MariaDB every time I run tests.