Dockerupdate
This commit is contained in:
13
Dockerfile
13
Dockerfile
@ -6,13 +6,24 @@ FROM node:lts AS development
|
|||||||
# Set working directory
|
# Set working directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Install system dependencies needed for sharp
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
libvips-dev \
|
||||||
|
python3 \
|
||||||
|
make \
|
||||||
|
g++ \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Copy package files
|
# Copy package files
|
||||||
COPY package.json /app/package.json
|
COPY package.json /app/package.json
|
||||||
COPY package-lock.json /app/package-lock.json
|
COPY package-lock.json /app/package-lock.json
|
||||||
|
|
||||||
# Install dependencies without downloading binaries (avoids sharp timeout)
|
# Install dependencies normally first
|
||||||
RUN npm ci --legacy-peer-deps --ignore-scripts
|
RUN npm ci --legacy-peer-deps --ignore-scripts
|
||||||
|
|
||||||
|
# Then install sharp properly for the current platform
|
||||||
|
RUN npm install --platform=linux --arch=x64 sharp
|
||||||
|
|
||||||
COPY . /app
|
COPY . /app
|
||||||
|
|
||||||
ENV CI=true
|
ENV CI=true
|
||||||
|
|||||||
Reference in New Issue
Block a user