mlocati / docker-php-extension-installer

Easily install PHP extensions in Docker containers
MIT License
4.33k stars 388 forks source link

enable / disable extension #983

Closed fruitl00p closed 1 month ago

fruitl00p commented 1 month ago

Hi!

I'm looking for a way to enable / disable an extension after it was already configured / installed etc. It's common to enable/disable xdebug quickly for an image and we currently handle this by utilizing docker-php-ext-enable xdebug vs rm "/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini"; which feels clunky having to download the APK everytime. I'd like to keep the actual module after installation but add / delete the .ini only. That would allow far easier on/offline working and keep the xdebug (enabled / disabled) features.

I know i'm almost there, but having the docker-php-ext-enable xdebug conditionally check if the .SO is already there before downloading would suffice for my usecase. Any chance this might be something you'd consider?

fruitl00p commented 1 month ago

sorry, this is the wrong repo :) (see https://github.com/docker-library/php/pull/1281)