TrafeX/docker-php-nginx

installing php extensions

tcurdt opened this issue · 1 comments

I just tried

ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/download/2.2.5/install-php-extensions /usr/local/bin/
RUN install-php-extensions @fix_letsencrypt
RUN install-php-extensions @composer
RUN install-php-extensions pdo_mysql

but it fails

> ERROR [stage-1  3/14] RUN install-php-extensions @fix_letsencrypt                                                                     0.1s
------
 > [stage-1  3/14] RUN install-php-extensions @fix_letsencrypt:
0.092 The script /usr/local/bin/install-php-extensions is meant to be used with official Docker PHP Images - https://hub.docker.com/_/php
------
Dockerfile:15
--------------------
  13 |     # install php extensions
  14 |     ADD --chmod=0755 https://github.com/mlocati/docker-php-extension-installer/releases/download/2.2.5/install-php-extensions /usr/local/bin/
  15 | >>> RUN install-php-extensions @fix_letsencrypt
  16 |     RUN install-php-extensions @composer
  17 |     RUN install-php-extensions pdo_mysql
--------------------
ERROR: failed to solve: process "/bin/sh -c install-php-extensions @fix_letsencrypt" did not complete successfully: exit code: 1

Is there maybe any way to leverage the that installer?

Hi @tcurdt ,

No that's not possible because the PHP extensions are installed als precompiled packages from Alpine Linux.
You should search for the package you need on https://pkgs.alpinelinux.org/packages and install it with apk add --no-cache <package>