diff --git a/backend/Dockerfile b/backend/Dockerfile index fb74fab..ccb6edd 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -31,9 +31,9 @@ RUN apk add --no-cache git sqlite vips vips-dev python3 make g++ # Copy package files first COPY --from=builder /app/package*.json ./ -# Rebuild sharp for the correct architecture (linuxmusl-x64) -# Install all production dependencies -RUN npm ci --omit=dev || npm install --production +# Install all production dependencies and rebuild sharp for linuxmusl-x64 +RUN npm ci --omit=dev || npm install --production && \ + npm rebuild sharp # Clean up build dependencies after installation to reduce image size RUN apk del python3 make g++ vips-dev