Skip to content

Commit ae613ba

Browse files
committed
fix: update dependencies in Dockerfile
- Bump ImageMagick version to 7.1.1-47 - Update LIB_HEIF, LIB_AOM, LIB_WEBP, and LIBJXL versions - Add S6 overlay version as a variable - Install specific versions of Pillow and pillow-avif-plugin - Update MozJPEG installation to use version variable
1 parent a2e6acd commit ae613ba

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

Dockerfile

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@ FROM php:8.3-fpm-bullseye
22

33
ENV DEBIAN_FRONTEND=noninteractive
44

5-
ARG IM_VERSION=7.1.1-39
6-
ARG LIB_HEIF_VERSION=1.18.2
7-
ARG LIB_AOM_VERSION=3.10.0
8-
ARG LIB_WEBP_VERSION=1.4.0
9-
ARG LIBJXL_VERSION=0.11.0
5+
ARG S6_OVERLAY_VERSION=1.22.1.0
6+
ARG IM_VERSION=7.1.1-47
7+
ARG LIB_HEIF_VERSION=1.20.0
8+
ARG LIB_AOM_VERSION=3.12.1
9+
ARG LIB_WEBP_VERSION=1.5.0
10+
ARG LIBJXL_VERSION=0.11.1
11+
ARG PILLOW_VERSION=11.3.0
12+
ARG PILLOW_AVIF_PLUGIN_VERSION=1.5.2
13+
ARG MOZJPEG_VERSION=4.1.1
1014
ARG TARGETPLATFORM
1115

1216
# Install s6-overlay
@@ -15,7 +19,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=amd64; \
1519
elif [ "$TARGETPLATFORM" = "linux/arm/v8" ]; then ARCHITECTURE=arm; \
1620
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=aarch64; \
1721
else ARCHITECTURE=amd64; fi \
18-
&& curl -sS -L -O --output-dir /tmp/ --create-dirs https://github.com/just-containers/s6-overlay/releases/download/v1.22.1.0/s6-overlay-${ARCHITECTURE}.tar.gz \
22+
&& curl -sS -L -O --output-dir /tmp/ --create-dirs https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${ARCHITECTURE}.tar.gz \
1923
&& tar xzf /tmp/s6-overlay-${ARCHITECTURE}.tar.gz -C /
2024

2125
# Install latest Nginx and dependencies & main libraries needed for ImageMagick
@@ -98,10 +102,10 @@ RUN pecl install yaml xdebug && \
98102
# Install MozJPEG
99103
RUN \
100104
cd /opt && \
101-
wget "https://github.com/mozilla/mozjpeg/archive/refs/tags/v4.1.1.tar.gz" && \
102-
tar xvf "v4.1.1.tar.gz" && \
103-
rm v4.1.1.tar.gz && \
104-
mv mozjpeg-4.1.1 mozjpeg&& \
105+
wget "https://github.com/mozilla/mozjpeg/archive/refs/tags/v${MOZJPEG_VERSION}.tar.gz" && \
106+
tar xvf "v${MOZJPEG_VERSION}.tar.gz" && \
107+
rm v${MOZJPEG_VERSION}.tar.gz && \
108+
mv mozjpeg-${MOZJPEG_VERSION} mozjpeg&& \
105109
cd mozjpeg && \
106110
cmake . && \
107111
make
@@ -117,14 +121,10 @@ RUN \
117121
curl https://bootstrap.pypa.io/pip/3.5/get-pip.py -o get-pip.py && \
118122
python3 get-pip.py && \
119123
python3 -m pip install --upgrade pip && \
120-
pip3 install numpy pillow
121-
122-
# pillow-avif-plugin only available for amd64/arm64 arch
123-
# https://github.com/python-pillow/Pillow/pull/5201
124-
# https://github.com/fdintino/pillow-avif-plugin/pull/38
125-
RUN if [ "$TARGETPLATFORM" = "linux/amd64" -o "$TARGETPLATFORM" = "linux/arm64" ]; then \
126-
pip3 install pillow-avif-plugin; \
127-
fi
124+
pip3 install numpy pillow==${PILLOW_VERSION}
125+
126+
# Install pillow-avif-plugin
127+
RUN pip3 install pillow-avif-plugin==${PILLOW_AVIF_PLUGIN_VERSION}
128128

129129
# To creates the necessary links and cache in /usr/local/lib
130130
RUN ldconfig /usr/local/lib

0 commit comments

Comments
 (0)