Dockercommit
This commit is contained in:
13
Dockerfile
13
Dockerfile
@ -5,11 +5,20 @@ FROM node:lts AS build
|
|||||||
|
|
||||||
WORKDIR /app
|
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 files
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json ./
|
||||||
|
|
||||||
# Install dependencies with legacy peer deps to handle @reach/router conflict
|
# Install dependencies with legacy peer deps and increased timeout
|
||||||
RUN npm install --legacy-peer-deps
|
# 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 source code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
Reference in New Issue
Block a user