From 2119c55e06d90172e2a4f5c80ba6256dd0662156 Mon Sep 17 00:00:00 2001 From: mukesh13 Date: Mon, 23 Jun 2025 15:39:47 +0530 Subject: [PATCH] Dockercommit --- Dockerfile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6646b60..b3447b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,11 +5,20 @@ FROM node:lts AS build WORKDIR /app +# Set environment variables to help with sharp installation +ENV SHARP_IGNORE_GLOBAL_LIBVIPS=1 +ENV npm_config_sharp_binary_host="https://npmjs.org/mirrors/sharp" +ENV npm_config_sharp_libvips_binary_host="https://npmjs.org/mirrors/sharp-libvips" + # Copy package files COPY package.json package-lock.json ./ -# Install dependencies with legacy peer deps to handle @reach/router conflict -RUN npm install --legacy-peer-deps +# Install dependencies with legacy peer deps and increased timeout +# Use --no-optional to skip optional dependencies that might cause issues +RUN npm config set fetch-timeout 600000 && \ + npm config set fetch-retry-mintimeout 10000 && \ + npm config set fetch-retry-maxtimeout 60000 && \ + npm install --legacy-peer-deps --no-optional --verbose # Copy source code COPY . .