FROM php:8.0-fpm RUN apt-get update && apt-get install -y libmagickwand-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* # install imagick # Version is not officially released https://pecl.php.net/get/imagick but following works for PHP 8 RUN mkdir -p /usr/src/php/ext/imagick; \ curl -fsSL https://github.com/Imagick/imagick/archive/06116aa24b76edaf6b1693198f79e6c295eda8a9.tar.gz | tar xvz -C "/usr/src/php/ext/imagick" --strip 1; \ docker-php-ext-install imagick;