diff --git a/frontend/dockerfile b/frontend/dockerfile index 7b1c78b..793d7c6 100644 --- a/frontend/dockerfile +++ b/frontend/dockerfile @@ -13,11 +13,17 @@ # CMD ["npm", "run", "start"] -FROM node:20-alpine +# Use a Debian-based image instead of Alpine to avoid musl-related issues +FROM node:20-slim WORKDIR /app COPY package*.json ./ -RUN npm install -g npm@latest && \ - npm install + +# 1. Clean npm cache +# 2. Force install optional dependencies +# 3. Use --legacy-peer-deps if needed +RUN npm cache clean --force && \ + npm install --include=optional --legacy-peer-deps + COPY . . RUN npm run build EXPOSE 3000