Skip to content

Instantly share code, notes, and snippets.

@mateusjatenee
Created April 28, 2024 20:04
Show Gist options
  • Save mateusjatenee/1b6140f017fe0498b8e94b55042df1cd to your computer and use it in GitHub Desktop.
Save mateusjatenee/1b6140f017fe0498b8e94b55042df1cd to your computer and use it in GitHub Desktop.
Vapor Dockerfile to install Ghostscript and Imagick while the PECL package is broken
FROM laravelphp/vapor:php83
ARG IMAGICK_VERSION=3.7.0
RUN apk --update add \
ghostscript && \
rm /var/cache/apk/*
RUN curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/refs/tags/${IMAGICK_VERSION}.tar.gz \
&& tar --strip-components=1 -xf /tmp/imagick.tar.gz \
&& phpize \
&& ./configure \
&& make \
&& make install \
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/ext-imagick.ini \
&& rm -rf /tmp/*
COPY . /var/task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment