fix: Improve Docker build reliability by cleaning npm cache before npm ci

- Move npm cache clean before npm ci to prevent corrupted package issues
- This fixes the string_decoder error occurring during GitHub Actions builds
This commit is contained in:
Muhammad Ibrahim
2025-10-28 16:12:31 +00:00
parent a11ff842eb
commit 5776d32e71
+3 -3
View File
@@ -46,10 +46,10 @@ COPY --chown=node:node backend/ ./backend/
WORKDIR /app/backend
RUN npm ci --ignore-scripts &&\
RUN npm cache clean --force &&\
npm ci --ignore-scripts &&\
npx prisma generate &&\
npm prune --omit=dev &&\
npm cache clean --force
npm prune --omit=dev
# Production stage
FROM node:lts-alpine