如何使用laradock安装php扩展gmp

我遵循laradock结构来安装php扩展。 这里是我的例子添加PHP_FPM_INSTALL_GMP=true.env

 ### PHP_FPM ################################ PHP_FPM_INSTALL_GMP=true 

添加args: - INSTALL_GMP=${PHP_FPM_INSTALL_GMP}

 ### PHP-FPM Container ####################################### php-fpm: build: context: ./php-fpm args: - INSTALL_GMP=${PHP_FPM_INSTALL_GMP} ..... 

并将以下代码附加到Dockerfile-70

 ##################################### # GMP: ##################################### USER root ARG INSTALL_GMP=false ENV INSTALL_GMP ${INSTALL_GMP} RUN if [ ${INSTALL_GMP} = true ]; then \ apt-get update -y && \ apt-get install -y libgmp-dev re2c libmhash-dev libmcrypt-dev file && \ ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/ && \ docker-php-ext-configure gmp && \ docker-php-ext-install gmp && \ docker-php-ext-enable gmp \ ;fi 

echo phpinfo();

 gmp support enabled GMP version 6.0.0 

GMP已经安装成功,但使用composer update来更新laravel项目,并得到这样的错误信息:

 Problem 1 - minishlink/web-push v1.4.3 requires mdanter/ecc ^0.4.0 -> satisfiable by mdanter/ecc[v0.4.4, v0.4.0, v0.4.1, v0.4.2, v0.4.3]. - minishlink/web-push v1.4.0 requires mdanter/ecc ^0.4.0 -> satisfiable by mdanter/ecc[v0.4.4, v0.4.0, v0.4.1, v0.4.2, v0.4.3]. - minishlink/web-push v1.4.1 requires mdanter/ecc ^0.4.0 -> satisfiable by mdanter/ecc[v0.4.4, v0.4.0, v0.4.1, v0.4.2, v0.4.3]. - minishlink/web-push v1.4.2 requires mdanter/ecc ^0.4.0 -> satisfiable by mdanter/ecc[v0.4.4, v0.4.0, v0.4.1, v0.4.2, v0.4.3]. - minishlink/web-push v1.4.3 requires mdanter/ecc ^0.4.0 -> satisfiable by mdanter/ecc[v0.4.4, v0.4.0, v0.4.1, v0.4.2, v0.4.3]. - mdanter/ecc v0.4.4 requires ext-gmp * -> the requested PHP extension gmp is missing from your system. - mdanter/ecc v0.4.4 requires ext-gmp * -> the requested PHP extension gmp is missing from your system. - mdanter/ecc v0.4.3 requires ext-gmp * -> the requested PHP extension gmp is missing from your system. - mdanter/ecc v0.4.2 requires ext-gmp * -> the requested PHP extension gmp is missing from your system. - mdanter/ecc v0.4.1 requires ext-gmp * -> the requested PHP extension gmp is missing from your system. - mdanter/ecc v0.4.0 requires ext-gmp * -> the requested PHP extension gmp is missing from your system. - Installation request for minishlink/web-push ^1.4 -> satisfiable by minishlink/web-push[v1.4.0, v1.4.1, v1.4.2, v1.4.3]. To enable extensions, verify that they are enabled in your .ini files: - /etc/php/7.0/cli/php.ini - /etc/php/7.0/cli/conf.d/10-mysqlnd.ini - /etc/php/7.0/cli/conf.d/10-opcache.ini - /etc/php/7.0/cli/conf.d/10-pdo.ini .... 

任何想法?