Skip to content

Commit

Permalink
fixed vips and ffi
Browse files Browse the repository at this point in the history
  • Loading branch information
deluxetom committed Jan 22, 2025
1 parent c2473d9 commit 062af90
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
30 changes: 25 additions & 5 deletions 8.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ ARG PUBLIC_DIR=public
ENV PORT=$PORT
ENV PUBLIC_DIR=$PUBLIC_DIR

ENV EXTENSIONS="redis apcu ast maxminddb amqp zip pdo_mysql pdo_pgsql bcmath opcache gettext intl exif pcntl sysvmsg sysvsem sysvshm xsl uuid igbinary bz2 gmp sockets imagick gd"
ENV EXTENSIONS="amqp apcu ast bcmath exif ffi gd gettext gmp igbinary imagick intl maxminddb opcache pcntl pdo_mysql pdo_pgsql redis sockets sysvmsg sysvsem sysvshm uuid xsl zip"
ENV BUILD_DEPS="make git autoconf wget"

ENV COMPOSER_ALLOW_SUPERUSER=1 COMPOSER_NO_INTERACTION=1 COMPOSER_CACHE_DIR="/tmp"
ENV PHP_INI_SCAN_DIR=":$PHP_INI_DIR/app.conf.d"
Expand All @@ -44,17 +45,14 @@ ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/do
RUN chmod +x /usr/local/bin/install-php-extensions

# Install required packages
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install -y --no-install-recommends ${BUILD_DEPS} \
acl \
file \
gettext \
gifsicle \
git \
imagemagick \
jpegoptim \
libexif-dev \
libheif-dev \
libvips42 \
optipng \
pngquant \
procps \
Expand All @@ -64,6 +62,28 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
zip \
&& rm -rf /var/lib/apt/lists/*

####################################################################################################
# Install latest libvips
# @see https://github.com/dooman87/imagemagick-docker/blob/main/Dockerfile.bookworm
####################################################################################################
ARG VIPS_VERSION=8.16.0
ENV VIPS_BUILD_DEPS="build-essential ninja-build meson pkg-config"
ENV VIPS_DEPS="libvips-dev"
ENV LD_LIBRARY_PATH="/usr/local/lib"
ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"

RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get remove --autoremove --purge -y libvips && \
apt-get install -y --no-install-recommends ${VIPS_BUILD_DEPS} ${VIPS_DEPS} && \
cd /usr/local/src && wget https://github.com/libvips/libvips/releases/download/v${VIPS_VERSION}/vips-${VIPS_VERSION}.tar.xz && \
xz -d -v vips-${VIPS_VERSION}.tar.xz && tar xf vips-${VIPS_VERSION}.tar && \
cd vips-${VIPS_VERSION} && \
meson setup build --libdir lib && meson compile -C build && meson install -C build && \
apt-get remove --autoremove --purge -y ${VIPS_BUILD_DEPS} && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /usr/local/src/vips-*

# Install PHP extensions
RUN set -eux; install-php-extensions $EXTENSIONS

Expand Down
2 changes: 2 additions & 0 deletions 8.4/manifest/usr/local/etc/php/app.conf.d/10-ffi.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
zend.max_allowed_stack_size=-1
ffi.enable=true

0 comments on commit 062af90

Please sign in to comment.