Lullabot / drupal9ci

Command Line Interface for implementing Continuous Integration in Drupal 9
GNU General Public License v3.0
161 stars 55 forks source link

Update underlying docker image or use third party one #80

Open fjgarlin opened 2 years ago

fjgarlin commented 2 years ago

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).

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:

juampynr commented 2 years ago

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.

sharique commented 2 years ago

+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.

fjgarlin commented 2 years ago

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.

sharique commented 2 years ago

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
juampynr commented 2 years ago

An attempt at this is made here: #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.

Perhaps the next major version of this project could be an interactive command line interface. Thoughts @fjgarlin ?

fjgarlin commented 2 years ago

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.

juampynr commented 2 years ago

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

juampynr commented 2 years ago

@fjgarlin just created https://github.com/Lullabot/drupal9ci/issues/82