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
|
ARG LIBVIPS_VERSION=8.16.2
|
||||||
|
|
||||||
WORKDIR /tmp
|
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 \
|
RUN set -eux; \
|
||||||
&& cd vips-${LIBVIPS_VERSION} \
|
curl -L -o vips.tar.gz https://github.com/libvips/libvips/releases/download/v${LIBVIPS_VERSION}/vips-${LIBVIPS_VERSION}.tar.gz; \
|
||||||
&& meson setup build --prefix=/usr --buildtype=release \
|
tar xz --strip-components=1 -f vips.tar.gz; \
|
||||||
&& ninja -C build \
|
cd vips-${LIBVIPS_VERSION}; \
|
||||||
&& ninja -C build install \
|
meson setup build --prefix=/usr --buildtype=release; \
|
||||||
&& ldconfig \
|
ninja -C build; \
|
||||||
&& cd / \
|
ninja -C build install; \
|
||||||
&& rm -rf /tmp/vips-${LIBVIPS_VERSION}
|
ldconfig; \
|
||||||
|
cd /; \
|
||||||
|
rm -rf /tmp/vips-${LIBVIPS_VERSION} /tmp/vips.tar.gz
|
||||||
|
|
||||||
# Stage 2: Build the Next.js app
|
# Stage 2: Build the Next.js app
|
||||||
FROM node:22-bullseye-slim AS builder
|
FROM node:22-bullseye-slim AS builder
|
||||||
|
|||||||
Reference in New Issue
Block a user