testing new docker file for build
This commit is contained in:
+9
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user