phpdocker-io/phpdocker.io

Composer not working in php74-fpm

boscho87 opened this issue · 5 comments

  1. 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-data

The 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 23

do you have the newest version of phpdockerio/php74-fpm?

Just so that you know, the php image already comes with composer, no need to download separately.

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).

okay looks good now dunno what the problem was

If it got fixed after you did a docker pull, it could potentially be another facet of this: phpdocker-io/base-images#44