Skip to content

Instantly share code, notes, and snippets.

@Kocal
Created February 2, 2024 00:43
Show Gist options
  • Save Kocal/4c8e1ac61e7704abf192f11d8669caeb to your computer and use it in GitHub Desktop.
Save Kocal/4c8e1ac61e7704abf192f11d8669caeb to your computer and use it in GitHub Desktop.
# ...
FROM dunglas/frankenphp:1-alpine AS frankenphp_upstream
FROM frankenphp_upstream AS frankenphp_base
RUN apk add --no-cache \
autoconf \
pkgconfig \
g++ \
make \
imagemagick-dev \
libwebp-dev \
;
RUN set -eux; \
cd /tmp \
&& yes '' | pecl download -Z imagick-3.7.0 \
&& tar -xf imagick-3.7.0.tar imagick-3.7.0/Imagick.stub.php \
&& sed -i '$ i\#endif' imagick-3.7.0/Imagick.stub.php \
&& tar -uvf imagick-3.7.0.tar imagick-3.7.0/Imagick.stub.php \
&& yes '' | pecl install -f /tmp/imagick-3.7.0.tar \
&& docker-php-ext-enable imagick \
&& rm -rf /tmp/imagick* \
&& rm -rf /tmp/pear \
&& cd - \
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment