Open en-jschuetze opened 1 year ago
mee to
It is because of this?
https://github.com/Imagick/imagick/pull/641
All my pipelines fail sporadic and not every time.
If you're looking for a workaround, you can explicitly use PHP 8.2. Here's an example of how I've done that in my workflow.
Until this gets merged, I am using a workaround in my automated builds to explicitly fix the PHP version to 8.2. This is suggested by Composer:
PHP version & extensions
(optimal) create your own build image and install Composer inside it. Note: Docker 17.05 introduced multi-stage builds, simplifying this enormously:
COPY --from=composer /usr/bin/composer /usr/bin/composer
In my Dockerfile I had:
FROM composer:2.5 as composer_base
I've updated it to copy Composer from their image into a PHP 8.2 image in order to build with that version:
FROM composer:2.5 # TODO: Revert back to image `composer:2.5` FROM php:8.2-alpine as composer_base COPY --from=composer /usr/bin/composer /usr/bin/composer
@dantheman2865
Can you explain what effect this has on the imagick extension?
Can you explain what effect this has on the imagick extension?
@en-jschuetze I've updated the comment to be more clear. I'm hoping to help folks who need a workaround because their automated builds are broken (as mine were).
Ah I see. You avoid php 8.3 :)
This is the workaround I used the last time:
RUN curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/7088edc353f53c4bc644573a79cdcd67a726ae16.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/* \
The package is the commit from #641
What is the status of this one? Is it close to be done?
This is the workaround I used the last time:
RUN curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/7088edc353f53c4bc644573a79cdcd67a726ae16.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/* \
The package is the commit from #641
This works also if you use 3.7.0 as commit id. So I guess I am fine for my project for now, but it would be awesome to get it fixed in a pecl release, too.
not happening every time, but 75% of all runs
It is very odd that it passes some of the time.
For the record, this doesn't happen on my computer compiling either inside a docker Ubuntu box, or natively on OSX.
I've possibly fixed it, though would prefer to see it compiling in the Github actions....which appear to be broken for something that is not my fault.
@Danack Any updates on this issue. Is there anything we can do to help related to the Github actions you mentioned in the last comment?
Same issue here, waiting resolution to use PHP 8.3 in production.
This is the workaround I used the last time:
RUN curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/7088edc353f53c4bc644573a79cdcd67a726ae16.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/* \
The package is the commit from #641
This solution works, but it is very temporary :D
I have encountered the same problem, when building multiplatform image on linux + AMD CPU. Build for linux/amd64 was successull, but for linux/arm64/v8 it ended up with this error.
Interestingly, when I tried to build it within container FROM docker:latest
, it completed successfully for both platforms.
Is there any progress or indication, where the problem might be?
OK, so we are waiting for imagick to release new version where this bug is fixed. Until then, there is temporary solution to use unreleased version of imagick.
Source: https://github.com/Imagick/imagick/issues/640
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
RUN install-php-extensions imagick/imagick@master
Is there any progress in this issue? We also have the same problem. Using the workaround for now.
Just here to say, this problem seems to be happening already for a few months but nobody seems to be working on it?
This worked for me.
RUN set -eux; \
install-php-extensions \
Imagick/imagick@master ;
failing also in arm architecture from this image: FROM --platform=linux/arm64 php:8.3-fpm-alpine
This solution worked for me:
RUN set -ex && \
apk add --no-cache --virtual .build-deps \
libxml2-dev \
shadow \
autoconf \
g++ \
make \
&& apk add php83-pecl-imagick --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community \
&& apk --update add imagemagick imagemagick-dev libwebp-dev libde265-dev libgomp \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& apk del .build-deps
any updates on this issue? My builds are failing like 75% of the time because of this, re-running the builds sometimes work. Sometimes I have to wat 5-10 min and rerun again
install-php-extensions \ Imagick/imagick@master ;
Hi @ingLomeland , I have used this approach with success, someone mentioned it above. As far as I know, the problem hasn't been solved yet.
Or if you want to pick a specific commit:
RUN set -eux; \
install-php-extensions \
Imagick/imagick@28f27044e435a2b203e32675e942eb8de620ee58 ;
This way you avoid breaking your build even if the master changes
A follow up of 582
Building on linux/amd64 the Dockerfile:
and the error is (not happening every time, but 75% of all runs):
it does not happen ever on arm architecture.
for reference an example run in a "real" world at https://github.com/Endava/docker-php/actions/runs/7009886813/job/19071577630