diff --git a/docker-compose.yml b/docker-compose.yml index 3864bde..d2fabbd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -308,6 +308,7 @@ services: - INSTALL_BZ2=${LARAVEL_HORIZON_INSTALL_BZ2} - INSTALL_GD=${LARAVEL_HORIZON_INSTALL_GD} - INSTALL_GMP=${LARAVEL_HORIZON_INSTALL_GMP} + - INSTALL_IMAGEMAGICK=${LARAVEL_HORIZON_INSTALL_IMAGEMAGICK} - INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL} - INSTALL_ZIP_ARCHIVE=${LARAVEL_HORIZON_INSTALL_ZIP_ARCHIVE} - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH} diff --git a/env-example b/env-example index ee6eee4..9caaf17 100644 --- a/env-example +++ b/env-example @@ -272,6 +272,7 @@ NGINX_SSL_PATH=./nginx/ssl/ LARAVEL_HORIZON_INSTALL_BZ2=false LARAVEL_HORIZON_INSTALL_GD=false LARAVEL_HORIZON_INSTALL_GMP=false +LARAVEL_HORIZON_INSTALL_IMAGEMAGICK=false LARAVEL_HORIZON_INSTALL_SOCKETS=false LARAVEL_HORIZON_INSTALL_YAML=false LARAVEL_HORIZON_INSTALL_ZIP_ARCHIVE=false diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index 4c8f611..d89cb70 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -67,6 +67,16 @@ RUN if [ ${INSTALL_GMP} = true ]; then \ docker-php-ext-install gmp \ ;fi +#Install ImageMagick package: +ARG INSTALL_IMAGEMAGICK=false +RUN set -eux; \ + if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ + apk add --update --no-cache imagemagick-dev; \ + pecl install imagick; \ + docker-php-ext-enable imagick; \ + php -m | grep -q 'imagick'; \ + fi + #Install BCMath package: ARG INSTALL_BCMATH=false RUN if [ ${INSTALL_BCMATH} = true ]; then \