Sí utilizamos funciones para tratado de imágenes en PHP, necesitamos instalar y activar PHP GD en el contenedor Docker.

Para ello vamos a nuestro Dockerfile y añadimos:
# syntax=docker/dockerfile:1 FROM php:7.2.5-apache RUN docker-php-ext-install mysqli RUN docker-php-ext-install pdo_mysql RUN apt-get update && \ apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev && \ docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \ docker-php-ext-install -j$(nproc) gd RUN apt-get install -y libjpeg-dev && \ docker-php-ext-configure gd --with-jpeg-dir=/usr/include/ && \ docker-php-ext-install -j$(nproc) gd #Activar modulos de apache: RUN a2enmod headers RUN a2enmod rewrite RUN a2enmod ssl RUN /etc/init.d/apache2 restart

Ingeniero en Informática, Investigador, me encanta crear cosas o arreglarlas y darles una nueva vida. Escritor y poeta. Más de 20 APPs publicadas y un libro en Amazon.