lorisleiva/laravel-docker

[Question] How to add/enable other extensions like gmp

Closed this issue ยท 4 comments

I have a laravel application and I use "laravel-notification-channels/webpush": "^5.0", and this requires gmp extension.
How can I add/enable such extension?
Thanks a lot!

Reopening this because I tried the following but didnt work:

before_script:
    - apk add php7.2-gmp
before_script:
    - apk add php-gmp

I don't think it's enough to install the extension, you should also enable it via the docker helper commands such as docker-php-ext-configure and docker-php-ext-install.

Have a look at the Dockerfiles of this repo to get some inspirations ๐Ÿ™‚

I managed to make this work by adding a line to my composer installation stage's script section:

install-php-extensions gmp