docker-library / php

Docker Official Image packaging for PHP
https://php.net
MIT License
3.81k stars 2k forks source link

Add `docker-php-ext-disable` #1277

Open mvorisek opened 2 years ago

mvorisek commented 2 years ago

This is a feature request to add easy way to disable php ext.

I propose to add docker-php-ext-disable, but adding a switch --disable to current docker-php-ext-enable script will solve this issue as well.

The expected behaviour of disabling an ext is to rename the ini file to something like .ini-disabled and when enabling back, check if such ini file exists, if yes, strip the -disabled suffix, if no, create a new ini file.

tianon commented 2 years ago

See https://github.com/docker-library/php/issues/220 :sweat_smile:

mvorisek commented 2 years ago

@tianon quite a lot of people demand this feature 😄

I belive the proposed solution here is better than simply rm the ini file, as the ini file might contain more configuration, and if so, this must be natively supported in docker-php-ext-enable to restore the disabled ini file