Loading Dockerfile +3 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,9 @@ FROM php:${php_version:+$php_version-}fpm-alpine as deps RUN --mount=type=bind,source=scripts/install-deps.sh,target=/stage /stage FROM deps as compile RUN --mount=type=bind,source=scripts/compile.sh,target=/stage /stage RUN --mount=type=bind,source=scripts/install-build-deps.sh,target=/stage /stage RUN --mount=type=bind,source=scripts/compile-dist-ext.sh,target=/stage /stage RUN --mount=type=bind,source=scripts/compile-imagick.sh,target=/stage /stage FROM deps as fastcgi Loading scripts/compile.sh→scripts/compile-dist-ext.sh +0 −25 Original line number Diff line number Diff line #!/bin/bash set -eux # Packaged build dependencies BUILD_DEPS=( autoconf build-base git gmp-dev imagemagick-dev jpeg-dev libpng-dev libwebp-dev libzip-dev ) # Distributed extensions PHP_EXT=( bcmath Loading @@ -31,10 +18,6 @@ php_version() { return 1 } # Install packaged dependencies apk update apk add "${BUILD_DEPS[@]}" # Build & install distributed extensions if php_version -gt 7.4; then GD_ARGS=( --with-jpeg=/usr --with-webp=/usr ) Loading @@ -43,11 +26,3 @@ else fi docker-php-ext-configure gd "${GD_ARGS[@]}" docker-php-ext-install -j$(nproc) "${PHP_EXT[@]}" # Download, build & install the Image Magick extension cd $(mktemp -d) git clone --depth 1 https://github.com/imagick/imagick.git . phpize ./configure make install echo "extension=imagick.so" > /usr/local/etc/php/conf.d/imagick.ini scripts/compile-imagick.sh 0 → 100755 +11 −0 Original line number Diff line number Diff line #!/bin/bash set -eux cd $(mktemp -d) git clone --depth 1 https://github.com/imagick/imagick.git . phpize ./configure make install echo "extension=imagick.so" > /usr/local/etc/php/conf.d/imagick.ini scripts/install-build-deps.sh 0 → 100755 +15 −0 Original line number Diff line number Diff line #!/bin/sh set -eux # Install packaged dependencies apk update apk add \ autoconf \ build-base \ git \ gmp-dev \ imagemagick-dev \ jpeg-dev \ libpng-dev \ libwebp-dev \ libzip-dev \ Loading
Dockerfile +3 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,9 @@ FROM php:${php_version:+$php_version-}fpm-alpine as deps RUN --mount=type=bind,source=scripts/install-deps.sh,target=/stage /stage FROM deps as compile RUN --mount=type=bind,source=scripts/compile.sh,target=/stage /stage RUN --mount=type=bind,source=scripts/install-build-deps.sh,target=/stage /stage RUN --mount=type=bind,source=scripts/compile-dist-ext.sh,target=/stage /stage RUN --mount=type=bind,source=scripts/compile-imagick.sh,target=/stage /stage FROM deps as fastcgi Loading
scripts/compile.sh→scripts/compile-dist-ext.sh +0 −25 Original line number Diff line number Diff line #!/bin/bash set -eux # Packaged build dependencies BUILD_DEPS=( autoconf build-base git gmp-dev imagemagick-dev jpeg-dev libpng-dev libwebp-dev libzip-dev ) # Distributed extensions PHP_EXT=( bcmath Loading @@ -31,10 +18,6 @@ php_version() { return 1 } # Install packaged dependencies apk update apk add "${BUILD_DEPS[@]}" # Build & install distributed extensions if php_version -gt 7.4; then GD_ARGS=( --with-jpeg=/usr --with-webp=/usr ) Loading @@ -43,11 +26,3 @@ else fi docker-php-ext-configure gd "${GD_ARGS[@]}" docker-php-ext-install -j$(nproc) "${PHP_EXT[@]}" # Download, build & install the Image Magick extension cd $(mktemp -d) git clone --depth 1 https://github.com/imagick/imagick.git . phpize ./configure make install echo "extension=imagick.so" > /usr/local/etc/php/conf.d/imagick.ini
scripts/compile-imagick.sh 0 → 100755 +11 −0 Original line number Diff line number Diff line #!/bin/bash set -eux cd $(mktemp -d) git clone --depth 1 https://github.com/imagick/imagick.git . phpize ./configure make install echo "extension=imagick.so" > /usr/local/etc/php/conf.d/imagick.ini
scripts/install-build-deps.sh 0 → 100755 +15 −0 Original line number Diff line number Diff line #!/bin/sh set -eux # Install packaged dependencies apk update apk add \ autoconf \ build-base \ git \ gmp-dev \ imagemagick-dev \ jpeg-dev \ libpng-dev \ libwebp-dev \ libzip-dev \