docksal / service-cli

CLI service image for Docksal
https://docksal.io
MIT License
19 stars 45 forks source link

Add PHP GMP Extention #85

Closed amjad1233 closed 6 years ago

amjad1233 commented 6 years ago

Hi,

I am sure someone has done this before.

How would I add php7.1-gmp extention to cli ?

I tried searching using apt-cache searc php-gmp but nothing came up.

Regards, Amjad

lmakarov commented 6 years ago

Being one of the PHP core extensions, gmp can be installed like this:

sudo docker-php-ext-install gmp

Check:

docker@cli:/var/www$ php -i | grep gmp
/usr/local/etc/php/conf.d/docker-php-ext-gmp.ini,
gmp
gmp support => enabled

Note: this approach is specific to the official PHP Docker images and all images derived from them, like docksal/cli

Docs: https://docs.docker.com/samples/library/php/#php-core-extensions

amjad-wp commented 6 years ago

Wow. That works perfect.

You're a champion.

Today I learned something new. https://docs.docker.com/samples/library/php/#php-core-extensions

mowens3 commented 3 years ago

sudo -E docker-php-ext-install gmp

on latest version

ivnish commented 2 years ago

Thank you mowens3!