Fix Docker build: Use git archive --remote for libvips source
- Replaced curl download with git archive --remote to fetch libvips source, bypassing previous download issues. - Adjusted tar extraction and directory navigation to correctly handle the output of git archive.
This commit is contained in:
+7
-3
@@ -30,15 +30,19 @@ ARG LIBVIPS_VERSION=8.16.2
|
|||||||
|
|
||||||
WORKDIR /tmp
|
WORKDIR /tmp
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
curl -L -o vips.tar.gz https://github.com/libvips/libvips/releases/download/v${LIBVIPS_VERSION}/vips-${LIBVIPS_VERSION}.tar.gz; \
|
mkdir libvips_src; \
|
||||||
tar xz --strip-components=1 -f vips.tar.gz; \
|
cd libvips_src; \
|
||||||
|
git archive --format=tar --remote=https://github.com/libvips/libvips.git v${LIBVIPS_VERSION} | tar x; \
|
||||||
|
cd ../; \
|
||||||
|
mv libvips_src/* .; \
|
||||||
|
rmdir libvips_src; \
|
||||||
cd vips-${LIBVIPS_VERSION}; \
|
cd vips-${LIBVIPS_VERSION}; \
|
||||||
meson setup build --prefix=/usr --buildtype=release; \
|
meson setup build --prefix=/usr --buildtype=release; \
|
||||||
ninja -C build; \
|
ninja -C build; \
|
||||||
ninja -C build install; \
|
ninja -C build install; \
|
||||||
ldconfig; \
|
ldconfig; \
|
||||||
cd /; \
|
cd /; \
|
||||||
rm -rf /tmp/vips-${LIBVIPS_VERSION} /tmp/vips.tar.gz
|
rm -rf /tmp/vips-${LIBVIPS_VERSION}
|
||||||
|
|
||||||
# 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