Fix Docker build: Download libvips tarball to temporary file first
- Modified the Dockerfile to download the libvips tarball to a temporary file (vips.tar.gz) using curl -o, then extract from that file. - Added 'set -eux' to the RUN command for better debugging output. - This addresses the 'gzip: stdin: not in gzip format' error by ensuring a complete download before extraction.
This commit is contained in:
+10
-8
@@ -29,14 +29,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ARG LIBVIPS_VERSION=8.16.2
|
||||
|
||||
WORKDIR /tmp
|
||||
RUN curl -L https://github.com/libvips/libvips/releases/download/v${LIBVIPS_VERSION}/vips-${LIBVIPS_VERSION}.tar.gz | tar xz --strip-components=1 \
|
||||
&& cd vips-${LIBVIPS_VERSION} \
|
||||
&& meson setup build --prefix=/usr --buildtype=release \
|
||||
&& ninja -C build \
|
||||
&& ninja -C build install \
|
||||
&& ldconfig \
|
||||
&& cd / \
|
||||
&& rm -rf /tmp/vips-${LIBVIPS_VERSION}
|
||||
RUN set -eux; \
|
||||
curl -L -o vips.tar.gz https://github.com/libvips/libvips/releases/download/v${LIBVIPS_VERSION}/vips-${LIBVIPS_VERSION}.tar.gz; \
|
||||
tar xz --strip-components=1 -f vips.tar.gz; \
|
||||
cd vips-${LIBVIPS_VERSION}; \
|
||||
meson setup build --prefix=/usr --buildtype=release; \
|
||||
ninja -C build; \
|
||||
ninja -C build install; \
|
||||
ldconfig; \
|
||||
cd /; \
|
||||
rm -rf /tmp/vips-${LIBVIPS_VERSION} /tmp/vips.tar.gz
|
||||
|
||||
# Stage 2: Build the Next.js app
|
||||
FROM node:22-bullseye-slim AS builder
|
||||
|
||||
Reference in New Issue
Block a user