From aeeb618581d8b629ad387fc25813dae2da4efe2d Mon Sep 17 00:00:00 2001 From: mukeshs Date: Thu, 16 Oct 2025 21:07:02 +0530 Subject: [PATCH] docker update --- fuse-starter-v20.0.0/Dockerfile | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/fuse-starter-v20.0.0/Dockerfile b/fuse-starter-v20.0.0/Dockerfile index d140e7c..480753b 100644 --- a/fuse-starter-v20.0.0/Dockerfile +++ b/fuse-starter-v20.0.0/Dockerfile @@ -1,37 +1,14 @@ -# Stage 1: Build Angular application -FROM node:18-alpine AS builder - +FROM node:16-alpine AS builder WORKDIR /app -# Copy package files COPY package*.json ./ +RUN npm install --legacy-peer-deps --prefer-offline -# Install dependencies with legacy peer deps -RUN npm ci --legacy-peer-deps - -# Copy all source files COPY . . - -# Build the application (development mode for faster builds) RUN npm run build -# Stage 2: Serve with Nginx -FROM nginx:alpine AS production - -# Copy built files - check your actual output directory name -# It might be 'fuse-angular' or 'fuse-starter-v20.0.0' +FROM nginx:alpine COPY --from=builder /app/dist/fuse-angular /usr/share/nginx/html - -# Custom nginx configuration for Angular routing -RUN echo 'server { \ - listen 80; \ - location / { \ - root /usr/share/nginx/html; \ - index index.html; \ - try_files $uri $uri/ /index.html; \ - } \ -}' > /etc/nginx/conf.d/default.conf - +RUN echo 'server { listen 80; location / { root /usr/share/nginx/html; index index.html; try_files $uri $uri/ /index.html; } }' > /etc/nginx/conf.d/default.conf EXPOSE 80 - CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file