From a6b211a74971d729c33266b054f00518455ae27d Mon Sep 17 00:00:00 2001 From: denshooter Date: Sun, 22 Feb 2026 01:45:16 +0100 Subject: [PATCH] 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. --- Dockerfile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 22b6e15..5503c7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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