Skip to content

Instantly share code, notes, and snippets.

@SoftCreatR
Last active October 1, 2022 16:07
Show Gist options
  • Save SoftCreatR/d3393d918407f0f9177f88147832e925 to your computer and use it in GitHub Desktop.
Save SoftCreatR/d3393d918407f0f9177f88147832e925 to your computer and use it in GitHub Desktop.
php-8.0.1-fpm-alpine3.12-imagick
ARG NAME_IMAGE_BASE='php'
ARG NAME_IMAGE_TAG='8.0.1-fpm-alpine3.12'
FROM ${NAME_IMAGE_BASE}:${NAME_IMAGE_TAG}
ARG ID_BUILD='build-20210118'
ARG VERSION_PHP='8.0.1-imagick'
ARG VERSION_OS='3.12.0'
ARG IMAGICK_COMMIT='448c1cd0d58ba2838b9b6dff71c9b7e70a401b90'
LABEL \
MAINTAINER='Sascha Greuel <hello@1-2.dev>' \
PHP_VERSION="$VERSION_PHP" \
ID_BUILD="$ID_BUILD" \
ALPINE="$VERSION_OS"
ENV PHPIZE_DEPS \
git \
make \
gcc \
g++ \
zlib-dev \
php8-dev
RUN set -eux; \
echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
apk add --no-cache --virtual \
.build-deps $PHPIZE_DEPS && \
apk add --no-cache \
imagemagick \
imagemagick-dev && \
rm -rf /var/cache/apk/* && \
cd /tmp && \
git clone https://github.com/Imagick/imagick && \
cd imagick && \
git checkout $IMAGICK_COMMIT && \
phpize && \
./configure && \
make && \
make install && \
echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini && \
rm -rf /tmp/* && \
apk del .build-deps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment