Docker run symfony on PHP-FPM

How can I install all needed php extension on this docker image to run symfony 5.
At this moment I can’t run composer install cos following error.

Problem 1
– Installation request for lorenzo/pinky 1.0.5 -> satisfiable by lorenzo/pinky[1.0.5].
– lorenzo/pinky 1.0.5 requires ext-xsl * -> the requested PHP extension xsl is missing from your system.
Problem 2
– lorenzo/pinky 1.0.5 requires ext-xsl * -> the requested PHP extension xsl is missing from your system.
– twig/inky-extra v3.0.5 requires lorenzo/pinky ^1.0.5 -> satisfiable by lorenzo/pinky[1.0.5].
– Installation request for twig/inky-extra v3.0.5 -> satisfiable by twig/inky-extra[v3.0.5].

My Dockerfile.

FROM php:7.4-fpm

RUN apt-get update && apt-get install -y 
        libfreetype6-dev 
        libjpeg62-turbo-dev 
        libpng-dev 
        nano 
    && docker-php-ext-configure gd --with-freetype --with-jpeg 
    && docker-php-ext-install -j$(nproc) gd

RUN curl --insecure https://getcomposer.org/download/1.10.19/composer.phar -o /usr/bin/composer && chmod +x /usr/bin/composer

# Set timezone
RUN rm /etc/localtime
RUN ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime
RUN "date"

WORKDIR /var/www/symfony

I tried to add following install command to dockerfile "php7.4-xsl"
but then I had follwoing error:

E: Unable to locate package php7.4-xsl
E: Couldn’t find any package by glob ‘php7.4-xsl’
E: Couldn’t find any package by regex ‘php7.4-xsl’

So how can I install all needed modules?

Thank you

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *