Skip to content

Commit

Permalink
build the imagick extension from repository
Browse files Browse the repository at this point in the history
  • Loading branch information
devinfd committed Dec 13, 2024
1 parent cd2b0f8 commit 5410655
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions staging.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@ FROM laravelphp/vapor:php83-arm

# Add the `imagemagick` PHP extension
RUN apk --update add imagemagick ghostscript
RUN pecl install imagick
RUN docker-php-ext-enable imagick
# RUN pecl install imagick
# RUN docker-php-ext-enable imagick

# TODO: Use latest released version, after https://github.com/Imagick/imagick/issues/640 is fixed
RUN apk add git --update --no-cache && \
git clone https://github.com/Imagick/imagick.git --depth 1 /tmp/imagick && \
cd /tmp/imagick && \
git fetch origin master && \
git switch master && \
cd /tmp/imagick && \
phpize && \
./configure && \
make && \
make install && \
apk del git && \
docker-php-ext-enable imagick

COPY ./php.ini /usr/local/etc/php/conf.d/overrides.ini

Expand Down

0 comments on commit 5410655

Please sign in to comment.