Skip to content

Commit 3d837d5

Browse files
authored
Merge pull request #22 from flyimg/fix-install-pillow-avif-plugi
fix: update Dockerfile to conditionally install pillow-avif-plugin ba…
2 parents 48a2e27 + d1bfe64 commit 3d837d5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ RUN docker-php-ext-install opcache && \
9393
ARG PILLOW_VERSION=11.3.0
9494
ARG PILLOW_AVIF_PLUGIN_VERSION=1.5.2
9595
RUN pip3 install --no-cache-dir --upgrade pip && \
96-
pip3 install numpy pillow==${PILLOW_VERSION} pillow-avif-plugin==${PILLOW_AVIF_PLUGIN_VERSION}
96+
pip3 install numpy pillow==${PILLOW_VERSION} && \
97+
if [ "$TARGETPLATFORM" = "linux/amd64" -o "$TARGETPLATFORM" = "linux/arm64" ]; then \
98+
pip3 install pillow-avif-plugin==${PILLOW_AVIF_PLUGIN_VERSION}; \
99+
fi
97100

98101
# To creates the necessary links and cache in /usr/local/lib
99102
RUN ldconfig /usr/local/lib
@@ -109,6 +112,6 @@ RUN chmod +x /usr/local/bin/docker-entrypoint
109112

110113
RUN rm -f /etc/nginx/conf.d/default.conf || true
111114

112-
ENV PORT 80
115+
ENV PORT=80
113116
WORKDIR /var/www/html
114117
ENTRYPOINT ["docker-entrypoint", "/init"]

0 commit comments

Comments
 (0)