Missing extensions?
Synchro opened this issue · 1 comments
Synchro commented
I read #94 and assumed that it would auto-install PHP extensions depending on the ext-
options in composer.json, but it doesn't seem to be working for me in my gitlab workflow. Instead I get:
Using docker image sha256:6e10fb20dffb5507d748d3890244fa471476b98e7576d760076de00b07e44607 for lorisleiva/laravel-docker:8.0 with digest lorisleiva/laravel-docker@sha256:68dedfc04c88d6b7633260d3d0b2428f168c16e81b56721e8217093158f94910 ...
55$ composer install --prefer-dist --no-ansi --no-interaction --no-progress --no-scripts
56Installing dependencies from lock file (including require-dev)
57Verifying lock file contents can be installed on current platform.
58Your lock file does not contain a compatible set of packages. Please run composer update.
59 Problem 1
60 - Root composer.json requires PHP extension ext-mysqli * but it is missing from your system. Install or enable PHP's mysqli extension.
61To enable extensions, verify that they are enabled in your .ini files:
62 -
63 - /usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini
64 - /usr/local/etc/php/conf.d/docker-php-ext-calendar.ini
65 - /usr/local/etc/php/conf.d/docker-php-ext-exif.ini
66 - /usr/local/etc/php/conf.d/docker-php-ext-gd.ini
67 - /usr/local/etc/php/conf.d/docker-php-ext-imagick.ini
68 - /usr/local/etc/php/conf.d/docker-php-ext-intl.ini
69 - /usr/local/etc/php/conf.d/docker-php-ext-pcntl.ini
70 - /usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini
71 - /usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini
72 - /usr/local/etc/php/conf.d/docker-php-ext-redis.ini
73 - /usr/local/etc/php/conf.d/docker-php-ext-soap.ini
74 - /usr/local/etc/php/conf.d/docker-php-ext-sodium.ini
75 - /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
76 - /usr/local/etc/php/conf.d/docker-php-ext-zip.ini
77You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
My composer.json contains:
"require": {
"php": "^8.0",
"ext-exif": "*",
"ext-gd": "*",
"ext-imagick": "*",
"ext-mysqli": "*",
"ext-pdo": "*",
"ext-pdo_mysql": "*",
"ext-sodium": "*",
which I note does not include some of the extensions listed in the error, though I guess they may pulled in by deps.
Is there something else I need to do?
Synchro commented
I managed to solve this by adding a line to my composer stage's script:
- install-php-extensions mysqli
however, I was under the impression that this image had some kind of mapping that would automatically enable extensions listed in the composer.json file?