davidalger / docker-images-php

PHP and PHP-FPM images for Docker based on EL 8
https://hub.docker.com/r/davidalger/php
MIT License
15 stars 16 forks source link

Add remi package repo as separate build option #2

Closed Den4ik closed 3 years ago

Den4ik commented 3 years ago

Related Issues:
https://github.com/davidalger/warden/issues/267 https://github.com/davidalger/warden/issues/270

Den4ik commented 3 years ago

@davidalger Please look at implementation when you have time

davidalger commented 3 years ago

@Den4ik Thanks for this. Had the chance to do some builds throughout the week and run some comparisons, and based on what I'm seeing it looks we'll be all set. Many of the versions of PHP extensions will be newer thanks to this change.

On PHP 7.4, I specifically checked for the JPEG compatibility issue I ran into porting the spec into IUS when I added PHP 7.4 (https://github.com/iusrepo/php74/pull/6) and it's not an issue. The Remi RPMs have it enabled on the bundled GD, so we're 👌🏻 on that front.

Most of my comparisons I've done like this after building new versions locally:

$ diff -u <(docker run --rm davidalger/php:7.4-ius php --ri gd) <(docker run --rm davidalger/php:7.4 php --ri gd)
--- /dev/fd/63  2020-12-20 21:04:41.000000000 -0600
+++ /dev/fd/62  2020-12-20 21:04:41.000000000 -0600
@@ -2,19 +2,16 @@
 gd

 GD Support => enabled
-GD Version => bundled (2.1.0 compatible)
+GD headers Version => 2.3.0
+GD library Version => 2.3.0
 FreeType Support => enabled
 FreeType Linkage => with freetype
-FreeType Version => 2.8.0
 GIF Read Support => enabled
 GIF Create Support => enabled
 JPEG Support => enabled
-libJPEG Version => 6b
 PNG Support => enabled
-libPNG Version => 1.5.13
 WBMP Support => enabled
 XPM Support => enabled
-libXpm Version => 30411
 XBM Support => enabled
 WebP Support => enabled
 BMP Support => enabled

There was one extension difference I found (msgpack was a dependency of one of the pecl builds on ius and thus previously included implicitly); took care of this in commit 3d296be.

$ diff -u <(docker run --rm davidalger/php:7.3-ius php -m) <(docker run --rm davidalger/php:7.3 php -m)
--- /dev/fd/63  2020-12-20 21:00:42.000000000 -0600
+++ /dev/fd/62  2020-12-20 21:00:42.000000000 -0600
@@ -23,7 +23,6 @@
 json
 libxml
 mbstring
-msgpack
 mysqli
 mysqlnd
 openssl

Since the results of my comparisons have been pretty encouraging, I'm going to abandon the idea of having two parallel builds running since it only complicates things. Instead I've deprecated the IUS images per #3 and pushed them to Docker Hub with an added -ius suffix so they'll remain available for a while but won't continue to build. I might point Warden's image builds to point at those so they'll keep building until I can test the PHP warden images using these new base images.

This PR should track as merged once I merge the PR opened with my final branch for making this change (which is based on this branch): #4