Answer the question
In order to leave comments, you need to log in
How to install php7.4-gd inside docker and enable it in PHP settings?
FROM php:7.4.7-fpm
USER root
RUN apt -y update
RUN apt -y --no-install-recommends install unzip wget curl libaio1 openssl
RUN apt-get update && apt-get upgrade -y
RUN apt -y install lsb-release apt-transport-https ca-certificates
RUN apt install -y software-properties-common
RUN add-apt-repository ppa:ondrej/php
RUN apt update
RUN apt-get install -y php7.4-gd
WORKDIR /app
COPY ./composer.json ./
COPY . .
RUN curl -sS https://getcomposer.org/installer -o composer-setup.php \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer
RUN composer self-update
RUN composer update
RUN composer install --no-dev && rm ./composer-setup.php
Answer the question
In order to leave comments, you need to log in
RUN apt-get install -y php7.4-gd
do
instead
RUN apt-get install -y libpng-dev && docker-php-ext-install gd
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question