thecodingmachine / docker-images-php

A set of PHP Docker images
MIT License
785 stars 138 forks source link

php extensions defined in the PHP_EXTENSIONS environment variable are not installed #329

Closed defser closed 2 years ago

defser commented 2 years ago

Using image 8.0-v4-fpm-node16 (possible more images affected)

Set environment variable PHP_EXTENSIONS to "intl gd sqlite3 pdo_sqlite imagick xdebug"

Exception: Invalid extension name found in PHP_EXTENSIONS environment variable. Found: 'intl'. Available extensions: calendar, ctype, curl, dom, exif, ffi, fileinfo, ftp, gettext, iconv, mbstring, opcache, pdo, phar, posix, readline, shmop, simplexml, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlreader, xmlwriter, xsl, zip.

Expected: The extensions defined in PHP_EXTENSIONS are installed and usable

beejaz commented 2 years ago

It doesnt work that way. ARG and ENV var is not working the same. As per the readme;

Beware :

The ARG PHP_EXTENSIONS command must be written before the FROM. This is not a typo.
ARG PHP_EXTENSIONS="" it's not the same as ENV PHP_EXTENSIONS=""