Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: 👷 changed to building imagick from source #2428

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions .kube/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM php:8.4-fpm

ENV PHP_VERSION 8.4
ENV IMAGICK_VERSION 3.7.0 # This should be bumped to the latest version and
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like part of the comment is missing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

ENV NODE_VERSION 22.11.0
ENV NVM_VERSION 0.40.1
ENV NVM_DIR /var/www/.nvm
Expand Down Expand Up @@ -36,9 +37,29 @@ RUN apt-get install -y \
RUN docker-php-ext-configure gd --with-freetype --with-jpeg
RUN docker-php-ext-install -j$(nproc) gd pdo_mysql mbstring exif pcntl bcmath bz2 zip soap intl opcache

RUN apt-get install -y libmagickwand-dev --no-install-recommends
RUN apt-get install -y \
libmagickwand-dev \
libmagickcore-dev \
--no-install-recommends

RUN pecl install imagick
# START BUILDING IMAGICK FROM SOURCE - this can be removed once pecl fixes issues installing with php8.4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please leave a link to #2425 in the comments. It'll just make it easier to understand when scanning the code later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

RUN apt-get install -y \
$PHPIZE_DEPS \
libtool

RUN mkdir -p /tmp/imagick
WORKDIR /tmp/imagick
RUN curl -L -o /tmp/imagick.tar.gz https://github.com/Imagick/imagick/archive/tags/${IMAGICK_VERSION}.tar.gz
RUN tar --strip-components=1 -xf /tmp/imagick.tar.gz
RUN phpize
RUN ./configure
RUN make
RUN make install
WORKDIR /
RUN rm -rf /tmp/imagick
# END BUILDING IMAGICK FROM SOURCE

# RUN pecl install imagick
RUN docker-php-ext-enable imagick

RUN printf "\n" | pecl install apcu
Expand All @@ -48,6 +69,11 @@ RUN pecl install -o -f redis && \
rm -rf /tmp/pear && \
docker-php-ext-enable redis

# - this can be removed once pecl fixes issues installing with php8.4
RUN apt-get remove -y \
$PHPIZE_DEPS \
libtool
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to do the remove in the same block as the install? I think it's more likely this will get missed when reverting later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to be there or the following pecl build commands fail. I thought those commands ensures build dependencies were installed if necessary when pecl runs, but it failed when I removed them prior to running those.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migrated to TODO comments which should be recognized by IDE's that implement finding the tags for pending items that are pending changes.


COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

RUN mkdir -p $NVM_DIR
Expand Down
Loading