Update underlying docker image or use third party one
While working on https://github.com/Lullabot/drupal9ci/pull/79 it was obvious that a lot has changed since last year (as it should in our world).
- Latest Drupal is now PHP8+ compatible, which means that recent sqlite versions aren't shipped with PHP.
- Composer 2 is now more stablished everywhere and should be the default
- Node 10 is unsupported
So the suggestion is to create a new image with the latest and brightest (for now) and change all instances of juampynr/drupal8ci:latest for that new one. Or to leverage an existing image which has what we need in it.
We can probably get an image with most of our needs out there, and then maybe add the latest LTS node and a few other useful tools to it.
The work here is mostly on the Dockerfile(9)s and then the image will need to be uploaded to dockerhub. Once this is done we can change and test the rest of the code.
Related issues/PRs:
- https://github.com/Lullabot/drupal9ci/pull/79
- https://github.com/Lullabot/drupal9ci/issues/72
Sounds good @fjgarlin. I think that it makes sense to update the Dockerfile to create a new image.
As for where to store the image, I would prefer GitHub's Container Registry rather than Docker Hub since now in Docker hub you need to pay in order to do automated builds.
+1 for upgrading base image, I recently upgraded my Drupal site to use PHP 8.1, but getting error on CI as image is still stuck at PHP 8.0.
An attempt at this is made here: https://github.com/Lullabot/drupal9ci/pull/81
--
Just thinking out loud here... I wonder how difficult would it be to add ddev or something like it (aka simple and easy) to the project, or find/create an image where we can set versions of PHP, node, etc. which also contains all we need.
In one of my personal project, I'm using following in .gitlab-ci.yml file for using PHP 8.1.
image: drupal:php8.1-apache-bullseye
.before_script_template:
before_script:
- apt-get update -yqq
- apt-get install -yqq git 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 libonig-dev libzip-dev wget
# Install PHP extensions
- docker-php-ext-install mbstring curl intl gd xml bz2
# Install & enable Xdebug for code coverage reports
# - pecl install xdebug
# - docker-php-ext-enable xdebug
# Remove the memory limit for the CLI only.
- echo 'memory_limit = -1' > /usr/local/etc/php/php-cli.ini
# Install Robo CI.
- wget https://robo.li/robo.phar
- chmod +x robo.phar && mv robo.phar /usr/local/bin/robo
An attempt at this is made here: #81
--
Just thinking out loud here... I wonder how difficult would it be to add
ddevor something like it (aka simple and easy) to the project, or find/create an image where we can set versions of PHP, node, etc. which also contains all we need.
Perhaps the next major version of this project could be an interactive command line interface. Thoughts @fjgarlin ?
That would be something really cool to get. Give the users a few options to choose from and then generate everything with the right versions. I really like the idea.
That would be something really cool to get. Give the users a few options to choose from and then generate everything with the right versions. I really like the idea.
I am going to start creating one using https://github.com/spf13/cobra-cli
@fjgarlin just created https://github.com/Lullabot/drupal9ci/issues/82