Problem/Motivation

Both core and gitlab templates (used in all contrib) rely heavily on images from this project.

When we had the need for a higher sqlite version, the "ubuntu-apache" variants were created, for PHP 8.3 and 8.4.

In the case of core, it's easier to control the image to use per branch as it is "just" one project, but the "gitlab_templates" project servers all contrib and also allows running current/previous/next minor/major versions of Drupal for the contrib modules. Due to this, we need to set one image or another depending on the version of Drupal, but if maintainers want to test other versions of PHP, then even more changes are needed.

We are trying to do the heavy lifting in the templates, but even that is challenging as seen in the issues here:
#3482069: SQLite version too low for Drupal 11 - update default php image to ubuntu-apache
#3483075: Update CORE_PHP_NEXT to 8.4
#3486021: Unable to run "composer (previous major)" from pipeline UI; no image
And more issues...

Proposed resolution

I suggest that we create the following images, to avoid issues like the above ones:
- 7.4-ubuntu-apache (it can be the same as 7.4-apache)
- 8.0-ubuntu-apache (it can be the same as 8.0-apache)
- 8.1-ubuntu-apache (it can be the same as 8.1-apache)
- 8.2-ubuntu-apache (it can be the same as 8.2-apache)

They don't need to have anything different, just be available under that name so the CI jobs find them. That would help the "gitlab_templates" project immensely.

If creating aliases or tags does the same thing then we might not need to create the images, I just don't know enough about the options available.

Comments

fjgarlin created an issue. See original summary.

fjgarlin’s picture

Title: Release ubuntu images for PHP 8.1 and 8.2 » Release ubuntu images for PHP 7.4, 8.0, 8.1 and 8.2
jonathan1055’s picture

Nice idea! This would really help to reduce support issues and maintain BC in customized templates.

fjgarlin’s picture

Issue summary: View changes

If aliases or tags have the same effect, those would be totally ok. I just don't know enough about dockerhub to know which solution might be easier. I'll edit the IS with this.

andypost’s picture

For me the biggest question is why we need to build new images for unsupported PHP versions?

Except security issues there's C-code incompatibilities with nowadays versions of Openssl, curl and databases

fjgarlin’s picture

No need to build anything if making aliases / tags of existing images is an option.

The goal here is that 8.1-apache and 8.1-ubuntu-apache (and the other versions listed in the issue) download THE SAME image.

andypost’s picture

Status: Active » Needs review

I did tag current images but only for :production tag, it should unblock the issue

Log

$ for i in 7.4 8.0 8.1 8.2; do docker pull drupalci/php-$i-apache:production; done
production: Pulling from drupalci/php-7.4-apache
Digest: sha256:b76b7a0feaa727bb9b02c2b6f7d53291a7a61b10c71552d9b0bf25309caec560
Status: Image is up to date for drupalci/php-7.4-apache:production
docker.io/drupalci/php-7.4-apache:production
production: Pulling from drupalci/php-8.0-apache
Digest: sha256:09d383ce1165e0f33970e3990fd8aa94f9ed417b4a4e44cd008c3e0268a814ad
Status: Image is up to date for drupalci/php-8.0-apache:production
docker.io/drupalci/php-8.0-apache:production
production: Pulling from drupalci/php-8.1-apache
Digest: sha256:b4384dc9fc262d1103e389276228838a22d0399477ca72f93e60f4024cf6411e
Status: Image is up to date for drupalci/php-8.1-apache:production
docker.io/drupalci/php-8.1-apache:production
production: Pulling from drupalci/php-8.2-apache
Digest: sha256:6b1ac9cfbdbbbd3664f62e2912ad18599c72f810a74041df74df58672f557f2a
Status: Image is up to date for drupalci/php-8.2-apache:production
docker.io/drupalci/php-8.2-apache:production

$ for i in 7.4 8.0 8.1 8.2; do docker tag drupalci/php-$i-apache:production drupalci/php-$i-ubuntu-apache:production; done

$ for i in 7.4 8.0 8.1 8.2; do docker push drupalci/php-$i-ubuntu-apache:production; done
The push refers to repository [docker.io/drupalci/php-7.4-ubuntu-apache]
1a18379d8a44: Mounted from drupalci/php-7.4-apache 
2f96119e6f18: Mounted from drupalci/php-7.4-apache 
3aa8386e7db8: Mounted from drupalci/php-7.4-apache 
4a8ef864bd80: Mounted from drupalci/php-7.4-apache 
db940f55786e: Mounted from drupalci/php-7.4-apache 
644769f6f334: Mounted from drupalci/php-7.4-apache 
73b74945bfbd: Mounted from drupalci/php-7.4-apache 
d371be183f65: Mounted from drupalci/php-7.4-apache 
ae2692ed4140: Mounted from drupalci/php-7.4-apache 
061b3391c8a0: Mounted from drupalci/php-7.4-apache 
1d1c28748b38: Mounted from drupalci/php-7.4-apache 
af1b2f2642a7: Mounted from drupalci/php-7.4-apache 
b5cd9fb24117: Mounted from drupalci/php-7.4-apache 
07958d3d3b3a: Mounted from drupalci/php-7.4-apache 
527e9d0ec2a3: Mounted from drupalci/php-7.4-apache 
46061c860dde: Mounted from drupalci/php-7.4-apache 
6877c4b749e2: Mounted from drupalci/php-7.4-apache 
66be3e5cd8ca: Mounted from drupalci/php-7.4-apache 
ae59111d78db: Mounted from drupalci/php-7.4-apache 
5cad9c7f642b: Mounted from drupalci/php-7.4-apache 
472345ecb40e: Mounted from drupalci/php-7.4-apache 
1e781a70a9cf: Mounted from drupalci/php-7.4-apache 
b9fd5db9c9a6: Mounted from drupalci/php-7.4-apache 
production: digest: sha256:b76b7a0feaa727bb9b02c2b6f7d53291a7a61b10c71552d9b0bf25309caec560 size: 5133
The push refers to repository [docker.io/drupalci/php-8.0-ubuntu-apache]
fe6c9e024a66: Mounted from drupalci/php-8.0-apache 
4f55205442ab: Mounted from drupalci/php-8.0-apache 
fd212e439f3d: Mounted from drupalci/php-8.0-apache 
551a0631e714: Mounted from drupalci/php-8.0-apache 
e32541047532: Mounted from drupalci/php-8.0-apache 
8d71624ddd16: Mounted from drupalci/php-8.0-apache 
80bc0129e2d9: Mounted from drupalci/php-8.0-apache 
b9bfd77c26ee: Mounted from drupalci/php-8.0-apache 
594be2cd643a: Mounted from drupalci/php-8.0-apache 
f6843eba50a3: Mounted from drupalci/php-8.0-apache 
cdf38e96c7c1: Mounted from drupalci/php-8.0-apache 
f2a7e77a993d: Mounted from drupalci/php-8.0-apache 
8051785b3a31: Mounted from drupalci/php-8.0-apache 
5a46ef57fac9: Mounted from drupalci/php-8.0-apache 
3768162f92ed: Mounted from drupalci/php-8.0-apache 
5465aa01c2ce: Mounted from drupalci/php-8.0-apache 
049e2f9b988f: Mounted from drupalci/php-8.0-apache 
bb1b9f4fb5f3: Mounted from drupalci/php-8.0-apache 
8e0e590acca1: Mounted from drupalci/php-8.0-apache 
53517f5005fc: Mounted from drupalci/php-8.0-apache 
1bdf69ee2327: Mounted from drupalci/php-8.0-apache 
b9fd5db9c9a6: Mounted from drupalci/php-7.4-ubuntu-apache 
production: digest: sha256:09d383ce1165e0f33970e3990fd8aa94f9ed417b4a4e44cd008c3e0268a814ad size: 4924
The push refers to repository [docker.io/drupalci/php-8.1-ubuntu-apache]
19203fb6eeab: Mounted from drupalci/php-8.1-apache 
b99d01c6daf9: Mounted from drupalci/php-8.1-apache 
production: digest: sha256:3982147ee9c87030f640ec7aadf7d1fa42f11d681e1052a86363f74f574e4d02 size: 742
The push refers to repository [docker.io/drupalci/php-8.2-ubuntu-apache]
40aa2edb5129: Mounted from drupalci/php-8.2-apache 
b99d01c6daf9: Mounted from drupalci/php-8.1-ubuntu-apache 
production: digest: sha256:ddf0a89094380665fd7c1cbede8d5362799b9d1cef7f31731bbe8ca8fe1d66b4 size: 742

fjgarlin’s picture

Status: Needs review » Fixed

https://hub.docker.com/r/drupalci/php-8.1-ubuntu-apache

Thanks so much! This helps a great deal!!

jonathan1055’s picture

Tested here and it works - using drupalci/php-7.4-ubuntu-apache:production
https://git.drupalcode.org/project/scheduler/-/jobs/3428789

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.