docker icon indicating copy to clipboard operation
docker copied to clipboard

Update pecl extensions in update.sh

Open J0WI opened this issue 5 years ago • 2 comments

See also https://github.com/matomo-org/plugin-QueuedTracking/issues/88

Note: the commit messages produced by @docker-library-bot might be garbage. See also nextcloud/docker#543

J0WI avatar Nov 23 '18 14:11 J0WI

Note: the commit messages produced by @docker-library-bot might be garbage.

I'd take that one step further -- if this merges as-is, I will be disabling the @docker-library-bot automation for this repository. If you want to go this route and keep the @docker-library-bot automation, you'll need to insert these into environment variables and update https://github.com/docker-library/oi-janky-groovy/blob/cb44df0fa3089fe6a14f53d097799a3947fb1fcd/update.sh/vars.groovy appropriately (see otherEnvs examples in other images such as ruby and python).

However, given the way that PECL extensions work, this is actually kind of dangerous, and I would not recommend moving forward with automated PECL bumps. Back before PHP 7.0 was well-supported, I saw many instances where the "latest" release of a given PECL extension would fail to install, fail to build, or worse, fail to work properly on one of either PHP 7.0 or PHP 5.6 (some cases were not supporting PHP 7 yet, and some would remove PHP 5 support when adding PHP 7 support).

See also https://github.com/docker-library/docs/blob/47d0e8d2082937a93f8a7b9a36422ee0d3dc71ab/php/README.md#pecl-extensions (from the php image documentation), which describes similar issues in the context of recommending using an explicit PECL extension version.

tianon avatar Nov 23 '18 16:11 tianon

That's why I'm trying to stick on a major release for php-redis: https://github.com/matomo-org/docker/blob/bf06118a1ad77fe6b1aeaf3cfe7c906680abf725/update.sh#L39

Would it be possible to just using the minor release as environment variable? This is the main part of maintaining PECL extensions. There are currently two more PRs to implement this in other images: https://github.com/nextcloud/docker/pull/543 https://github.com/joomla/docker-joomla/pull/70 So if we can find a solution many projects may benefit from it.

J0WI avatar Nov 23 '18 19:11 J0WI