Composer not working in php74-fpm
boscho87 opened this issue · 5 comments
boscho87 commented
- The Dockerfile
FROM phpdockerio/php74-fpm:latest
WORKDIR "/application"
RUN apt-get update; \
apt-get -y --no-install-recommends install \
git \
php7.4-bz2 \
php7.4-intl \
php7.4-xdebug; \
apt-get clean;
RUN usermod -u 1000 www-dataThe Error: when ./composer.phar install (The Problem occures with composer v1 and composer > v2)
Fatal error: Uncaught Error: Class 'Phar' not found in /application/composer.phar:23
Stack trace:
#0 {main}
thrown in /application/composer.phar on line 23luispabon commented
do you have the newest version of phpdockerio/php74-fpm?
luispabon commented
Just so that you know, the php image already comes with composer, no need to download separately.
boscho87 commented
do you have the newest version of phpdockerio/php74-fpm?
afaik, yes i deleted all images and containers but still was running into this issue. on SO 21..11.2021
As workaround i just used a other php container to run composer install. (just if somone run in to the same issue).
boscho87 commented
okay looks good now dunno what the problem was
luispabon commented
If it got fixed after you did a docker pull, it could potentially be another facet of this: phpdocker-io/base-images#44